Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Create function to search media by slug. | Elrond | 2012-03-16 | 1 | -0/+9 |
| | | | | | | | | | Searching media by slug is easy on mongo. But doing the joins in sqlalchemy is not as nice. So created a function for doing it. Well, and create the same function for mongo, so that it also works. | ||||
* | Generic check_media_slug_used db utility. | Elrond | 2012-03-05 | 1 | -1/+10 |
| | | | | | | | | In two cases (generating a new slug and editing the slug) it is nice to know in advance (before the db gets angry) that the slug is used/free. So created a db utility function to check for this on mongo and sql: check_media_slug_used() | ||||
* | SQL: Tool to cleanup unused tag slugs. | Elrond | 2012-03-05 | 1 | -0/+22 |
| | | | | | | | | The current SQL layout/sqlalchemy strucuture can't detect whether a slug isn't needed any more and delete it. So provide a tool function to cleanup unused slugs. It's currently not hooked to any gmg function! | ||||
* | Implement atomic_update for SQL. | Elrond | 2012-03-04 | 1 | -1/+14 |
| | | | | | | On sqlalchemy most updates are atomic enough for most use cases. Anyway, here is an atomic_update that is compatible to the mongo version. | ||||
* | Excepting that migration 1 doesn't work(!), sqlalchemy migration branch working | Christopher Allan Webber | 2012-01-29 | 1 | -2/+5 |
| | | | | | | | The reason migration 1 doesn't work, and is commented out, is because of sqlalchemy-migrate not handling certain constraints while dropping binary sqlite columns right. See also: http://code.google.com/p/sqlalchemy-migrate/issues/detail?id=143&thanks=143&ts=1327882242 | ||||
* | Update the string outputs to match our tests: newlines, ...->:, etc. | Christopher Allan Webber | 2012-01-29 | 1 | -2/+2 |
| | |||||
* | migrations_to_run here a list, so no reason to call it | Christopher Allan Webber | 2012-01-29 | 1 | -1/+1 |
| | |||||
* | self.latest_migration now a property, so we shouldn't __call__ it! | Christopher Allan Webber | 2012-01-29 | 1 | -1/+1 |
| | |||||
* | For clarity, self.database -> self.session. | Christopher Allan Webber | 2012-01-29 | 1 | -12/+12 |
| | | | | | Actually, I'm not even sure *that* is ideal! But better than what we had... | ||||
* | Yet *another* self.database -> self.database.bind fix! | Christopher Allan Webber | 2012-01-29 | 1 | -1/+1 |
| | |||||
* | Fix database_current_version for when self.migration_data is None. | Christopher Allan Webber | 2012-01-29 | 1 | -0/+4 |
| | |||||
* | another db -> db.bind fix. | Christopher Allan Webber | 2012-01-29 | 1 | -1/+1 |
| | |||||
* | A few basic fixes to sql/util.py | Christopher Allan Webber | 2012-01-29 | 1 | -5/+9 |
| | | | | | | - MigrationRecord to MigrationData, again - If the table doesn't exist, return None for database_current_migration - database.engine -> database.bind | ||||
* | Also switch database_current_migration to a property | Christopher Allan Webber | 2012-01-29 | 1 | -3/+4 |
| | |||||
* | Make latest_migration a property | Christopher Allan Webber | 2012-01-29 | 1 | -0/+1 |
| | |||||
* | Import MigrationData, not MigrationRecord | Christopher Allan Webber | 2012-01-29 | 1 | -3/+3 |
| | |||||
* | Another db->db.engine because I'm bad at things ;) | Christopher Allan Webber | 2012-01-29 | 1 | -7/+7 |
| | | | | Thanks again Elrond. | ||||
* | Another MigrationManager fix. | Christopher Allan Webber | 2012-01-29 | 1 | -1/+1 |
| | | | | self.database -> self.database.engine (thanks again Elrond for the catch) | ||||
* | assert was positive when it should be negative, fixed | Christopher Allan Webber | 2012-01-29 | 1 | -1/+1 |
| | |||||
* | Use .first() instead of [0]... thanks elrond :) | Christopher Allan Webber | 2012-01-29 | 1 | -5/+2 |
| | |||||
* | We should probably add that object to the DB also :P | Christopher Allan Webber | 2012-01-29 | 1 | -1/+2 |
| | |||||
* | Commit that new migration record ;) | Christopher Allan Webber | 2012-01-29 | 1 | -0/+1 |
| | |||||
* | Add create_new_migration_record method to MigrationManager | Christopher Allan Webber | 2012-01-29 | 1 | -2/+7 |
| | |||||
* | Added init_tables method to MigrationManager | Christopher Allan Webber | 2012-01-29 | 1 | -2/+12 |
| | |||||
* | More work on SQL MigrationManager | Christopher Allan Webber | 2012-01-29 | 1 | -15/+25 |
| | | | | | | | Added methods: - migration_data - database_current_migration - migrations_to_run | ||||
* | Removing printer argument now that we use self.printer | Christopher Allan Webber | 2012-01-29 | 1 | -1/+1 |
| | |||||
* | Finishing the init_or_migrate function | Christopher Allan Webber | 2012-01-29 | 1 | -1/+7 |
| | |||||
* | More work on migration manager, including adding a dry run function | Christopher Allan Webber | 2012-01-29 | 1 | -6/+76 |
| | |||||
* | Beginnings of the SQL migration manager | Christopher Allan Webber | 2012-01-29 | 1 | -1/+100 |
| | |||||
* | Big ol' start of the SQL migrations system. | Christopher Allan Webber | 2012-01-29 | 1 | -0/+59 |
Things definitely don't work yet, but should be heading in the right direction. |