aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/migrations
Commit message (Collapse)AuthorAgeFilesLines
* Fix some unused imports and local variables.Ben Sturmfels2021-09-231-1/+0
|
* Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.Ben Sturmfels2021-03-052-2/+1
|
* Merge branch 'transcoding_progress'Boris Bobrov2018-07-121-0/+28
|\ | | | | | | This probably broke stuff
| * Add main_transcoding_progress column migrationvijeth-aradhya2017-08-221-0/+28
| | | | | | | | | | | | | | This field is required to store the progress of the default resolution of the media. So, we now store the total progress of transcoding the video in 'transcoding_progress' and progress of transcoding the default resolution in 'main_transcoding_progress'.
* | Merge remote-tracking branch 'gsoc2016/Subtitle-1'Boris Bobrov2018-07-101-0/+36
|\ \
| * | Adding the migration filesaksham11152016-07-191-0/+36
| | |
* | | move alembic.ini to python app dirBoris Bobrov2017-11-141-0/+56
| |/ |/|
* | Pass connection to EnvironmentContext.configureBoris Bobrov2017-03-041-2/+1
|/ | | | | | In https://bitbucket.org/zzzeek/alembic/issues/419/ we were suggested use connection instead of engine. This should fix an issue reported via ml.
* Switch initial_revision alembic migration to make tables if they aren't thereChristopher Allan Webber2016-03-261-1/+401
| | | | | | | | | This is a necessary step towards deprecating sqlalchemy-migrate. * mediagoblin/db/migrations/versions/52bf0ccbedc1_initial_revision.py (upgrade): Update for adding tables. Mostly generated via Alembic's autogenerate tools. (downgrade): Added a comment.
* Set target_metadata in alembic's env.py to Base.metadataChristopher Allan Webber2016-03-261-1/+2
| | | | | | | | This allows us to make use of automatically generated migrations, at least for core. * mediagoblin/db/migrations/env.py (target_metadata): Switch to gmg's Base.metadata.
* Update out script.py mako template to support branch_labelsChristopher Allan Webber2016-03-261-1/+3
| | | | | | | This is important (probably) for long-running plugin branches. * mediagoblin/db/migrations/script.py.mako: Updated to upstream Alembic version of this file.
* Fixes #5421 - Ensures Report.object_id is nullableJessica Tallon2016-02-291-0/+33
| | | | | | | It seems there was a commit for a while where the migration was making Report.object_id NOT NULL and this caused an errror when a report deleted the associated object (media). This migrtion checks it's nullable and if not, alters it so it is.
* Migration for #5415 - I forgot it, Doh!Jessica Tallon2016-02-291-0/+44
|
* Simply for the Notification.object_id migrationJessica Tallon2016-02-291-10/+0
|
* Missing perensJessica Tallon2016-02-291-1/+3
|
* Fixed issue introduced in previous migrationJessica Tallon2016-02-291-0/+39
|
* Change Notification.object_id to be ID of Comemnt not TextCommentJessica Tallon2016-02-291-0/+72
| | | | | | | | This shouldn't really effect much but it is a needed change for the future this changes the Notification.object_id to be the ID of the Comment (the link table to the comment object) rather than TextComment (the comment object itself). This is needed as now comments can be other things, other than TextComment.
* Fix issue #5411 sqlite connection closesAndrew Browning2016-02-232-2/+4
| | | | | This update changes migrations to wrap db.execute results in a list to keep the connection from closing for sqlite migrations.
* Fix #5398 and #5395 - Fix tests failing due to problem creating connection ↵Jessica Tallon2016-01-201-11/+3
| | | | | | | | | | | | | | | for alembic For some reason the alembic connection wasn't seeing any tables that existed however the existing connection works well and we shouldn't be creating a brand new one when we have one ready to use. I've used a little bit of a hack due to our old version of alembic. After 0.7.5 of alembic it offers a `Config.attributes` dictionary which is designed to allow you to pass your connection/engine/whatever to the env.py config script so you're not required to create new ones. As we're on an older version I just create a dictionary with the same name and use it as otherwise documented. It seems this is the suggested fix for #5395 and it fixes #5398 too.
* Fix #5390 - Create migration to delete Notifications and fix ReportJessica Tallon2016-01-202-1/+63
| | | | | | | When a user deleted media or other objects any notificationn objects or reports would cause errors as the object doesn't exist anymore. This now removes them or sets them to None as expected by the code. This also adds some code to the base deletion code to make sure this happens when an object is deleted.
* Use inspect_table inplace of redefining them allJessica Tallon2016-01-181-38/+12
| | | | | | Just like we would have in sqlalchemy-migration inspect_table works and is better than constantly redefining a table in the migration. This switches the migration to use that method.
* Fix #5382 - Add migration and fix so tombstones are removed from collectionsJessica Tallon2016-01-151-0/+84
| | | | | | | | | | | | When an item is deleted it should be removed from all collections, this commit makes that happen. It's got two changes: 1. Adds the code so when an object is soft deleted, it's automatically removed from all collection items 2. Add a migration to fix this issue for those who have tombstones (Graveyard objects) in their collections because of this bug. This commit requires you to run a migration
* Initial alembic migration to base other migrations onBoris Bobrov2016-01-111-0/+22
| | | | Use this migration as a parent for yours.
* Add initial migration guide.Berker Peksag2014-10-021-1/+57
| | | | This can be moved to docs/source/devel/migrations.rst.
* Add initial Alembic migrations.Berker Peksag2014-08-134-0/+94