aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/migration_tools.py
Commit message (Collapse)AuthorAgeFilesLines
* This was a very small update, I'm hoping to rebase after this to solve sometilly-Q2013-08-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | other problems. I started looking at the tests in this update. This update I spent fixing the tests to work with my new code. --\ mediagoblin/db/migration_tools.py --| Merging from ticket 679 --\ mediagoblin/db/migrations.py --| Added unique constraint to Privilege.privilege_name --\ mediagoblin/db/models.py --| Deleted vestigial Privilege.is_admin_or_moderator method --\ mediagoblin/templates/mediagoblin/moderation/user.html --| Add a `Ban User` / `UnBan User` for admin --\ mediagoblin/test/test_api.py --| Fixed test with my new changes --\ mediagoblin/test/test_auth.py --| Try to fix test, still having problems --\ mediagoblin/test/test_modelmethods.py --| Wrote my first test for the User.has_privilege method --\ mediagoblin/test/test_modelmethods.py --| Fixed test with my new changes --\ mediagoblin/test/test_sqlmigrations.py --| Merging from ticket 679 --\ mediagoblin/test/tools.py --| Editted add_fixture_user to allow for privileges rather than active column
* 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.