aboutsummaryrefslogtreecommitdiff
path: root/lib/sql/migration
Commit message (Expand)AuthorAge
* Add patch tag infrastructure•••This change add patch 'tags', eg 'Acked-by' / 'Reviewed-by', etc., to patchwork. Tag parsing is implemented in the patch parser's extract_tags function, which returns a Counter object of the tags in a comment. These are stored in the PatchTag (keyed to Tag) objects associated with each patch. We need to ensure that the main patch lists do not cause per-patch queries on the Patch.tags ManyToManyField (this would result in ~500 queries per page), so we introduce a new QuerySet (and Manager) for Patch, adding a with_tag_counts() method to populate the tag counts in a single query. As users may be migrating from previous patchwork versions (ie, with no tag counts in the database), we add a 'retag' management command. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2015-05-28
* migration: Add cleanup-people migration script•••Now that we only create Person object once the User has been confirmed, we can clean up unused Person objects from the database. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2014-05-08
* lib/sql/migration: Fix column names for MySQL/MariaDB•••The first issue is that patchwork was no longer accepting new patches via the apps/patchwork/bin/parsemail.sh script. When I was trying to invoke it manually, it only printed "no project found". I was able to figure out that this was caused by changes to the database scheme which are taken care of by the two SQL scripts: lib/sql/migration/012-project-add-columns.sql lib/sql/migration/013-bundle-names.sql The catch - these first script don't run with MySQL - or rather MariaDB that Fedora has switched to. MariaDB doesn't like the quotes around the table and column names. Patch below. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Ralf Baechle2013-10-13
* bundles: Don't allow slashes in bundle names•••Because bundle names are used in URLs, we don't want slashes in them. Include a SQL migration script. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2013-04-20
* Add URL and SCM data to projects•••This allows us to display friendly links to the project website, web SCM UI and SCM URL. For example for the patchwork project these could be set to: web_url: http://jk.ozlabs.org/projects/patchwork/ scm_url: git://ozlabs.org/home/jk/git/patchwork webscm_url: http://git.ozlabs.org/?p=patchwork;a=tree Requires a DB schema upgrade Signed-off-by: Simo Sorce <idra@samba.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Simo Sorce2012-11-15
* sql: remove development migration script•••The projectmaintainer heirachy hasn't been implemented, so we don't need the migration script yet. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2011-12-08
* models: Add PatchChangeNotification and record patch state changes•••Add a PatchChangeNotification model to keep track of changes to a patch's state. Hook this up to Patch's pre_save signal. Requires a DB schema upgrade. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2011-04-14
* Add email opt-out system•••We're going to start generating emails on patchwork updates, so firstly allow people to opt-out of all patchwork communications. We do this with a 'mail settings' interface, allowing non-registered users to set preferences on their email address. Logged-in users can do this through the user profile view. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2011-04-14
* registration: use EmailConfimation rather than separate registration app•••Since we have infrastructure for email confirmations, we no longer need the separate registration app. Requires a migration script, which will delete all inactive users, including those newly added and pending confirmation. Use carefully. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2011-04-14
* Use generic email confirmation object•••Rather than having a UserPerson-specific confirmation, add an EmailConfirmation object to allow multiple types of confirmations (eg, opt-out requests in future). To do this, we use a view (patchwork.views.confirm) that will call the type-specific view with the confirmation object. Also, add tests to check that the User/Person linkage system works. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2011-04-14
* Add support for git-pull requests•••Add a a pull_url to the Patch object, and update the parser to look for git-pull style emails. Requires SQL migration script. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2010-11-01
* sql: Add uncommitted migration scripts•••Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2010-08-10
* migration: fix whitespace•••Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2009-02-27
* migration: reset bundlepatch sequence on setup•••Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2009-02-27
* [sql] Fix up bundle-reorder migration script•••We need to add grants for the new table, and drop the old to prevent reference constraint errors. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2009-02-10
* [sql] Perserve bundle ordering in bundle reorder migration script•••Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2009-02-08
* Normalise order numbers in bundle-ordering migration SQL•••Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2009-02-07
* Complete bundle ordering migration script•••Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2009-02-07
* Initial bundle reordering support•••todo: * implement ajax reorder api * finish migration script * order patches in bundle view Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2009-01-29
* [models] Make patches unique on (msgid, project), not just (msgid)•••On patchwork.ozlabs.org, we may see multiple patches for different projects, but with the same message-id. We want these patches to show up on both projects, so we need to change the current UNIQUE contstraint on msgid. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2008-10-29
* Don't just rely on random for UserPersonConfirmation keys•••It looks like we're getting identical keys generated for confirmation keys. Problem has been reported to django, but in the meantime, salt with the user and email details, then sha1 to give the final key. This requires an increase in the field size for key, migration script included. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2008-09-11
* Use hex strings for hash values•••Binary strings a too hard to manage in DB queries and XMLRPC methods, as we get all kinds of encoding issues. Change HashField to use a hex string, and add a migration script for db updates. The patches should be rehashed after migration. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2008-09-10