aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/migration_tools.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix #5391 - Alembic migrations would only work for SQLiteJessica Tallon2016-01-181-0/+1
| | | | | | The database connection was being set in a alembic.ini config file, if the user had specified postgres the "sqlite" connection URL in alembic.ini would override that. We probably should look into this more so i've opened #5395.
* Enable alembic as the main tool for migrationsBoris Bobrov2016-01-111-6/+8
| | | | | | Enable alembic for all migrations and limit the max number of sqlalchemy-migration migration. All new migrations must now be in Alembic!
* Fix a exception db closed exception in migrationsJessica Tallon2015-12-291-0/+21
| | | | | | | Some sqlite migrations were failing due to some problems with sqlite. A work around has been created for these however it does involve loading lots of data into memory. If you have a large database you should consider trying to move to postgres.
* Do not call AlembicMigrationManager.init_tables() for now.Berker Peksag2014-10-021-6/+8
| | | | sqlalchemy-migrate will do this for us.
* Provide a better manager API for Alembic.Berker Peksag2014-08-151-6/+27
|
* Add initial Alembic migrations.Berker Peksag2014-08-131-0/+29
|
* func_name removed in Python 3.Berker Peksag2014-07-281-1/+1
|
* Continue to port GMG codebase.Berker Peksag2014-05-081-1/+3
|
* Renaming replace_table to replace_table_hack and documenting why it's a hackChristopher Allan Webber2013-10-101-3/+9
| | | | | | We'd still prefer people use other solutions when possible! This commit sponsored by Michał Masłowski. Thank you!
* Actually rename the table back, or else we just lose the old table! ;)Christopher Allan Webber2013-10-101-1/+1
|
* I made some changes in this commit to help out with other people trying to worktilly-Q2013-10-091-0/+27
| | | | | | around the SQLite problems with Alter table. I added a new function to migration_tools (replace_table) which does all the work I did in my migration of core__users, but is now usable for other migrations.
* Starting to write unit tests...tilly-Q2013-07-301-4/+4
|
* I actually had to do a bit more work than I thought, because I needed to accounttilly-Q2013-07-291-8/+7
| | | | | | for plugins. In this commit I changed the MigrationManager and DatabaseData ob- jects to account for FOUNDATIONS in any plugin's (or main program's) models.py file.
* This was a very simple ticket actually. I created a list called FOUNDATIONS intilly-Q2013-07-291-1/+15
| | | | | | | | | | | | | mediagoblin/db/models.py. This list holds all of the information about rows that should be created at database initialization. Read the documentation near the FOUNDATIONS list to understand the proper format for this list. All of the work is done through a new method on MigrationManager in mediagoblin/db/migrations_tools.py. This method, `populate_table_foundations` parses the FOUNDATIONS list and creates the foundations based on the data incl- uded. This only ever happens when the database is initialized. Migrations to releases with new Foundations should be very easy just using the basic database functionality.
* Changing the information spat out while printing from media types->pluginsChristopher Allan Webber2013-07-121-2/+1
| | | | | | Previously it called even plugins media types. Ha! This commit sponsored by Jon Merkley. Thank you!
* Give a more useful error if a table already exists and so we can't create it ↵Christopher Allan Webber2013-03-041-1/+7
| | | | | | during migrations This commit sponsored by Andrzej Prochyra. Thanks!
* Move db.sql.migration_tools to db.migration_tools.Elrond2013-01-081-0/+270
Follow the new trend.