aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/migrations
Commit message (Collapse)AuthorAgeFilesLines
* 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