aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/migrations.py
Commit message (Collapse)AuthorAgeFilesLines
* changed User model pw_hash field to nullable and added migrationsRodney Ewing2013-05-241-0/+11
|
* Make uuid look like a uuid.Elrond2013-04-271-1/+1
| | | | | | If we really have to create a visible uuid (for a slug in this case), don't try to hide the fact that it is a uuid. So format it like a uuid.
* Check for duplicate collection slugs and make them unique. Add unique ↵Rodney Ewing2013-04-241-1/+37
| | | | constraint to collection.slug model
* Simplifying the test for whether or not a user and slug combo exists.Christopher Allan Webber2013-02-271-3/+1
| | | | | | | Thanks to tchernobog for catching this (it was breaking on postgres) and Elrond for the suggestion on how to fix it. This commit sponsored by Caleb Cooper. Thanks Caleb!
* Import sqlalchemy's and_ and use it in our select statementChristopher Allan Webber2013-02-261-2/+3
| | | | This commit sponsored by Hans-Jörg Dollansky. Thank you!
* And of course, we need to actually commit at the end of a migration.Christopher Allan Webber2013-02-261-0/+3
| | | | This commit sponsored by Tamas Kemenczy. Thanks, Tamas!
* Dope'ily missed .count() on the query where we're countingChristopher Allan Webber2013-02-251-1/+1
| | | | | | Thanks for catching, Elrond. This commit sponsored by Graham King. Thank you!
* Supplying migrations for a bold new era of mediagoblin entry slugsChristopher Allan Webber2013-02-251-0/+54
| | | | | | | | | | | | | | | | Okay, that's a totally confusing statement, but the docstring of this migration summarizes it well: Entries without slugs now display differently in the url like: /u/cwebber/m/id=251/ ... because of this, we should back-convert: - entries without slugs should be converted to use the id, if possible, to make old urls still work - slugs with = (or also : which is now also not allowed) to have those stripped out (small possibility of breakage here sadly) This commit sponsored by John Sullivan. Thanks johnsu01! :)
* Use inspect_table; default user license==None.Elrond2013-01-221-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | Use inspect_table in the new migration. Makes code more readable, really. And make the default for the preferred license be None. This is a userspace thing, so we can even change the migration here. Changing the migration means, that people running the migration before this commit get a "" in User.license_preference, while people running the migration now get a None. Both values are okay. None has been designated as "Use the site's default". We're not actually having a site default right now. Which means no license is selected in the dropdown. While "" means "All rights reserved" being chosen by the user. Side note: Having no license being selected in the submit dropdown is as "worse" as before and does not really hurt much. MediaEntry.license==None means "All rights reserved" as does "" also do.
* Add a license preference fieldMark Holmquist2013-01-171-0/+12
| | | | | | | | | | | | | This feature is absolutely necessary. Now a user can simply define their default license and quickly go through a form, as opposed to stopping to click on the select and choosing the same option over and over again. Also added DB migration for the field, so that's working now, too. Rebased by Sebastian and made the default value to be unicode. Reviewed-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Move db.sql.migration_tools to db.migration_tools.Elrond2013-01-081-1/+1
| | | | Follow the new trend.
* Add inspect_table.Elrond2013-01-081-7/+4
| | | | | | In our current scheme of migrations, we reflect the current sql schema into an SQLAlchemy schema. So let's have a tool function for this.
* Move all the migration tools into new migration_tools.pyElrond2013-01-081-1/+1
| | | | | | | | | Factor all the migration related stuff out into a new .db.sql.migration_tools. First we don't have to load this module for our normal server. Second it makes all the import dependencies a little more cleaner.
* Move db.sql.models* to db.models*Sebastian Spaeth2013-01-071-1/+1
|
* Move db.sql.util to db.utilSebastian Spaeth2013-01-071-1/+1
| | | | | | | | Now that sqlalchemy is providing the database abstractions, there is no need to hide everything in db.sql. sub-modules. It complicates the code and provides a futher layer of indirection. Move the db.sql.util.py to db.util.py and adapt the importers.
* Move db.sql.migrations to db.migrationsSebastian Spaeth2012-12-251-0/+189
|
* Move db/migrations.py -> db/mongo/migrations.pyElrond2011-12-201-110/+0
| | | | And change references.
* Move db/util.py -> db/mongo/util.pyElrond2011-12-201-1/+1
| | | | | - Change some reference - Provide a wrapper db/util.py
* Merge branch 'video_gstreamer-only'Joar Wandborg2011-11-211-0/+8
|\ | | | | | | | | | | Conflicts: mediagoblin/db/migrations.py mediagoblin/submit/views.py
| * Multimedia support - Commiting from a not yet finished state - Details belowJoar Wandborg2011-09-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | * DONE Initially testing with arista ** DONE Video display templates *** TODO Multi-browser support ** TODO Video thumbnails ** TODO Link to original video ** TODO Video cropping Also contains a lot of "debug" print's
* | Factor out a add_table_field functionElrond2011-10-211-23/+16
| | | | | | | | | | | | Migrations often just add a new field to some table/collection. So just have a nice helper function for this!
* | Finished splitting util.py into separate files.Aaron Williamson2011-10-011-1/+1
|/
* Merge branch 'gullydwarf-cfdv-f357_lost_password_functionality'Christopher Allan Webber2011-09-081-0/+15
|\ | | | | | | | | Conflicts: mediagoblin/auth/routing.py
| * user_add_forgot_password_token_and_expires migration should set new fields ↵Christopher Allan Webber2011-09-071-2/+2
| | | | | | | | to None/null
| * oops, uses Alejandro's fp_verification_key. my bad.Caleb Forbes Davis V2011-08-281-2/+2
| |
| * Adding fotgot password functionalityAlejandro Villanueva2011-08-281-0/+15
| |
* | 508. Updates copyright/license informationWill Kahn-Greene2011-09-011-1/+1
|/
* Add fail_error and fail_metadata fields to MediaEntry and relevant migrationChristopher Allan Webber2011-08-131-0/+17
|
* Missing multi=True closing this migration, oops :)Christopher Allan Webber2011-08-121-0/+1
|
* Merge branch 'master' into processingChristopher Allan Webber2011-08-111-0/+10
|\ | | | | | | | | Conflicts: mediagoblin/db/migrations.py
| * Bug #372 - MediaEntry.thumbnail_file not usedCaleb Forbes Davis V2011-08-101-0/+10
| | | | | | | | | | - deleted the thumbnail_file from the media_entries collection - added a migration to remove the field from previous db versions
* | Store the task id of a processing action in the database.Christopher Allan Webber2011-07-241-0/+12
|/
* Migration for mediafiles main->originalChristopher Allan Webber2011-07-171-0/+16
|
* First migration: Add markdown bio!Christopher Allan Webber2011-07-141-3/+17
|
* Removing old style migrations... not in use anymoreChristopher Allan Webber2011-07-111-57/+1
|
* Just making a note of where the new migrations will go!Christopher Allan Webber2011-07-101-0/+11
|
* Merge remote branch 'refs/remotes/gullydwarf-cfdv/is315'Christopher Allan Webber2011-06-211-2/+17
|\
| * removes unecessary dependence on existence of username for User migration01, ↵cfdv2011-06-201-6/+5
| | | | | | | | + fix whitespace issues
| * adds accommmodations for migration of fields in User: bio and urlcfdv2011-06-201-2/+18
| |
* | Only migrate to description_html if description also exists.Christopher Allan Webber2011-06-201-1/+2
|/
* Provide a migration to add description_html to MediaEntries that don't have itChristopher Allan Webber2011-06-191-0/+16
|
* mediagoblin.globals->mediagoblin.mg_globalsChristopher Allan Webber2011-06-121-2/+0
|
* User migration works (but the rest of the system isn't updated for new user ↵Christopher Allan Webber2011-05-221-0/+39
setup yet)