Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | 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 | |
| | | ||||||
* | | import changeset into sql models | Christopher Allan Webber | 2012-01-29 | 1 | -0/+7 | |
| | | ||||||
* | | 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) | |||||
* | | Make name the primary key in migration records | Christopher Allan Webber | 2012-01-29 | 1 | -2/+1 | |
| | | ||||||
* | | 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 | 3 | -0/+97 | |
|/ | | | | Things definitely don't work yet, but should be heading in the right direction. | |||||
* | Nearly complete support for Tags | Elrond | 2012-01-28 | 2 | -4/+52 | |
| | | | | | | | | | | | These changes allow all of the rest of the code to use tags in sql as they were used on mongo. It's not efficient at all, as changing tags usually means to remove all old tags and adding all new. The only problem here is: Old slugs for tags are not removed, because they're shared across all MediaTags and dropping orphans is not always easy. | |||||
* | Add develover sql switch | Elrond | 2012-01-28 | 2 | -4/+20 | |
| | | | | | | | | | | | | | | | | | If you want to play with the current state of sql, you need a switch to turn it on. So here is the super secret developer switch. So you want to know where it is? Here it is: Create a file mediagoblin/db/sql_switch.py and put one line in it: "use_sql = True" (or False to disable again). Right, that's it. If you want to delete it, remember to delete the *.pyc too. Be careful not to "git add" it by accident! | |||||
* | Let some code support "media without slug" | Elrond | 2012-01-28 | 2 | -13/+10 | |
| | | | | | | | | | | | | | | The upcoming SQL database will allow having media without a slug again. This might especially be useful for API support, where the uploaded image (media) does not have *any* information to generate a slug from. This code change mostly allows the sql backend to have no slug in its model and improves some parts to properly handle that. It specifically does not have any web frontend support to edit/create MediaEntries with no slug. | |||||
* | Move declarative_base Base into base.py | Elrond | 2012-01-26 | 2 | -5/+5 | |
| | | | | The base class of all models "Base" should be in base.py. | |||||
* | Proper url_to_{prev,next} for SQL | Elrond | 2012-01-22 | 1 | -0/+21 | |
| | | | | Uses complete sqlalchemy syntax now. | |||||
* | Create a fully functional get_comments for SQL | Elrond | 2012-01-22 | 1 | -0/+7 | |
| | | | | | Using proper sqlalchemy syntax instead of the emulated mongo one. | |||||
* | Convert over the license field, too! | Christopher Allan Webber | 2012-01-21 | 1 | -1/+1 | |
| | ||||||
* | License "all rights reserved" default should be None/NULL, not empty string | Christopher Allan Webber | 2012-01-21 | 3 | -3/+3 | |
| | ||||||
* | Added migration for license field, resolved conflict in db/sql/models.py | Aaron Williamson | 2012-01-19 | 7 | -9/+138 | |
|\ | ||||||
| * | Add copyright header and a bit of pep8ification | Elrond | 2012-01-20 | 6 | -11/+113 | |
| | | | | | | | | | | | | Nearly all the sql files missed a copyright header. So added it! And while there fixed a few pep8 things. | |||||
| * | Use custom query class | Elrond | 2012-01-20 | 1 | -1/+21 | |
| | | | | | | | | | | | | | | | | | | A custom query class allows to add more methods on queries (read: "cursors"). This custom query class especially adds a .sort with a calling convention exactly like the mongo one. Makes a lot of existing code happy! | |||||
* | | Moved get_license_data to mixin.py, added license to sql media model, added ↵ | Aaron Williamson | 2012-01-18 | 3 | -6/+7 | |
| | | | | | | | | translation tags to license template. | |||||
* | | Merge branch 'mediagoblin-upstream' into feature544_basic_license_data | Aaron Williamson | 2012-01-18 | 1 | -0/+28 | |
|\| | ||||||
| * | sql/fake.py: Some fake objects/methods to calm the code | Elrond | 2012-01-18 | 1 | -0/+28 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | sql/fake.py contains some fake classes and functions to calm the rest of the code base. Or provide super minimal implementations. Currently: - ObjectId "class": It's a function mostly doing int(first_arg) to convert string primary keys into integer primary keys. - InvalidId exception - DESCENING "constant" | |||||
* | | Fixed a syntax error in edit/views and added back in some missing license ↵ | Aaron Williamson | 2012-01-17 | 1 | -1/+8 | |
| | | | | | | | | stuff from models | |||||
* | | Fixed merge with upstream | Aaron Williamson | 2012-01-17 | 1 | -106/+47 | |
| | | ||||||
* | | Merged changes with upstream | Aaron Williamson | 2012-01-17 | 16 | -318/+902 | |
|\| | ||||||
| * | Add MediaFile table and related infrastructure. | Elrond | 2012-01-11 | 3 | -3/+49 | |
| | | | | | | | | | | | | | | | | | | | | | | | | - This adds a new SQL table field type for path tuples. They're stored as '/' separated unicode strings. - Uses it to implement a MediaFile table. - Add relationship and proxy fields on MediaEntry to give a nice media_files "view" there. - Let the converter fill the MediaFile. | |||||
| * | Fix url_for_self mixup | Elrond | 2012-01-11 | 2 | -24/+5 | |
| | | | | | | | | | | Move changes from mongo/models:url_for_self back into mixin:url_for_self. | |||||
| * | Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin | Christopher Allan Webber | 2012-01-10 | 3 | -42/+97 | |
| |\ | | | | | | | | | | | | | Conflicts: mediagoblin/db/mongo/models.py | |||||
| | * | Add DB Mixin classes and use them | Elrond | 2012-01-08 | 3 | -61/+97 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A bunch of functions on the db objects are really more like "utility functions": They could live outside the classes and be called "by hand" passing the appropiate reference. They usually only use the public API of the object and rarely use database related stuff. Goals: - First, simple: Share the code with the SQL objects, so that the code doesn't need to be duplicated. - Second, it might unclutter the db models and make them more into "model only" stuff. - Doesn't really hurt. | |||||
| * | | Fixed #724 and added extra infos to the atom feed (author uri and links to ↵ | Michele Azzolari | 2012-01-10 | 1 | -3/+5 | |
| |/ | | | | | | | the html version of each entry) |