aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/migrations.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'location'Jessica Tallon2014-10-091-0/+37
|\ | | | | | | | | | | | | | | | | | | | | | | Add Location model which holds textual, geolocation coordiantes or postal addresses. This migrates data off Image model metadata onto the general Location model. It also adds the ability for location to be set on MediaEntry, User, MediaComment and Collection models. The geolocation plugin has been updated so that the location can be displayed in more general places rather than explicitely on the MediaEntry view. If GPS coordiantes are set for the User the profile page will also have the OSM provided by the geolocation plugin.
| * Add location model and migrationsJessica Tallon2014-10-091-0/+37
| |
* | Merge branch '905-activities'Jessica Tallon2014-10-071-2/+193
|\ \ | | | | | | | | | | | | | | | Add Activity and Generator models which allow for activities to be created. This now works with the feed API.
| * | Fix all the unit tests and clean up codeJessica Tallon2014-10-061-32/+42
| | |
| * | Only have Model.activity for activity compatable objects/targetsJessica Tallon2014-09-031-23/+13
| | |
| * | Fix migrations and refactor object_typeJessica Tallon2014-09-021-43/+105
| | | | | | | | | | | | | | | | | | | | | - Make changes to objectType to be more pythonic "object_type" - Move object_type to mixins rather than be on the models - Convert migrations to sqlalchemy core rather than ORM (fix) - Change TYPES to use descriptive strings rather than numbers
| * | Add ActivityIntermediator table and refactor some of Activity modelJessica Tallon2014-08-271-37/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This has introduced a intermediatory table between object/target and the activity. This allows for multiple activities to be associated with one object/target. - This moves some of the methods off Activity model into a mixin which didn't need to interact with database things. - This also cleaned up the migrations as well as adding retroactive creation of activities for collection creation.
| * | Create activity model and add activity creationJessica Tallon2014-08-221-0/+58
| |/ | | | | | | | | | | | | | | This creates the Activity and Genrator models from the Activity Streams spec and. I then created a migration which retro-actively create activities for media uploaded and comments created. Through out the code I've added so automatically activties are created when a user peforms an action (uploading media, commenting, etc.).
* | Fix migrations on Python 2.Christopher Allan Webber2014-09-301-0/+3
| | | | | | | | This commit sponsored by Loïc Grobol. Thank you!
* | Merge branch 'master' into merge-python3-portChristopher Allan Webber2014-09-161-9/+179
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Has some issues, will iteratively fix! Conflicts: mediagoblin/gmg_commands/__init__.py mediagoblin/gmg_commands/deletemedia.py mediagoblin/gmg_commands/users.py mediagoblin/oauth/views.py mediagoblin/plugins/api/views.py mediagoblin/tests/test_api.py mediagoblin/tests/test_edit.py mediagoblin/tests/test_oauth1.py mediagoblin/tests/test_util.py mediagoblin/tools/mail.py mediagoblin/webfinger/views.py setup.py
| * Fix a python2.6 compatibility issue. Removing a dict comprehension.Christopher Allan Webber2014-08-181-1/+2
| | | | | | | | This commit sponsored by Christopher Beppler. Thanks!
| * Elrond keeps pointing out places I should "is not None" at :)Christopher Allan Webber2014-08-081-2/+2
| |
| * Okay, we don't know that indexes are falsey, so let's make it clearer. Yeek!Christopher Allan Webber2014-08-081-1/+1
| |
| * this negation needs parens.Christopher Allan Webber2014-08-081-1/+1
| |
| * Pull the indexes out of the dictionary directlyChristopher Allan Webber2014-08-081-8/+11
| | | | | | | | Instead of checking for their keys and pulling them out later, that is.
| * If the constraint already exists, roll back to a sane state.Christopher Allan Webber2014-08-081-1/+1
| |
| * Explaining why we're committing mid-migrationChristopher Allan Webber2014-08-081-0/+4
| |
| * Only add the constraint if we need to. Catch an exception if we don't.Christopher Allan Webber2014-08-071-6/+10
| | | | | | | | Also, updating the comment about sqlite being crazy :)
| * Document both migrations, comment out old migrationChristopher Allan Webber2014-08-071-9/+35
| |
| * Add a new migration which removes/fixes the old migrationChristopher Allan Webber2014-08-071-0/+50
| | | | | | | | | | | | | | The previous migration, as it turns out, was not needed, and there were many inconsistencies put in place by adding it. See issue #920. This commit sponsored by Gergő Tisza. Thank you!
| * Fix issue where create_uuid doesn't exist nor usedJessica Tallon2014-07-221-1/+2
| |
| * Make sure new media has a new uuid added onJessica Tallon2014-07-221-7/+6
| |
| * Adds migration on MediaEntry to add uuidJessica Tallon2014-07-221-1/+0
| |
| * Fix #894 - index User.username fieldJessica Tallon2014-07-171-1/+15
| | | | | | | | This commit sponsored by Emily O'Leary. Thank you!
| * Adding comments in the migration explaining a bit what's going on.Christopher Allan Webber2014-06-111-0/+2
| | | | | | | | This commit sponsored by Philip Horger. Thank you!
| * Explicitly set the column names to "user" and "privilege"Christopher Allan Webber2014-06-111-2/+4
| |
| * Switch "user_id" to "privilege" and "privilege_id" to "user".Christopher Allan Webber2014-06-101-17/+23
| | | | | | | | | | | | | | | | | | This builds on the previous code Natalie wrote, but makes some changes: - More direct alterations for non-sqlite code - In both cases, I've made it so that we switched the field names from privilege_id and user_id to user and privilege respectively. This way we can do the name swap, but in one case it's "easy": just changing the name. (In the sqlite case it's still tricky though.)
| * Merge remote-tracking branch 'refs/remotes/tilly-q/ticket-874' into mergetestChristopher Allan Webber2014-06-101-0/+46
| |\ | | | | | | | | | | | | Conflicts: mediagoblin/db/migrations.py
| | * Made the columns properly referenced in models and migrations.tilly-Q2014-04-231-10/+7
| | |
| | * Renamed the columns on core__privileges_users table so that they are unique andtilly-Q2014-04-221-0/+45
| | | | | | | | | | | | will not cause any more problems.
| * | Set a default value to MediaEntry.media_metadatatilly-Q2014-05-141-1/+2
| | |
| * | Changed the name of the metadata columntilly-Q2014-04-211-1/+1
| | |
| * | Moved the metadata column to MediaEntry rather than MediaFiletilly-Q2014-04-211-4/+4
| | |
| * | In this commit, I added a new column which will be used for RDFa metadata oftilly-Q2014-04-211-0/+12
| |/ | | | | | | media.
* | Remove sqlalchemy-migrate imports from the codebase. Do not touch tests yet.Berker Peksag2014-06-271-1/+1
| |
* | Use six.text_type instead of unicode().Berker Peksag2014-06-021-2/+4
|/ | | | I will be switch to use ``from __future__ import unicode_literals`` later.
* I went through the code and just removed some blank spaces. I also looked ittilly-Q2013-11-191-3/+2
| | | | thru and it looked great.
* Addressed ticket number 630 by removing MediaEntry.collectedJosie2013-11-181-0/+14
|
* Renaming replace_table to replace_table_hack and documenting why it's a hackChristopher Allan Webber2013-10-101-3/+3
| | | | | | We'd still prefer people use other solutions when possible! This commit sponsored by Michał Masłowski. Thank you!
* Merge remote-tracking branch 'tilly-q/merge-tillyq-moderation' into ↵Christopher Allan Webber2013-10-101-21/+4
|\ | | | | | | merge-tillyq-moderation
| * I made some changes in this commit to help out with other people trying to worktilly-Q2013-10-091-21/+4
| | | | | | | | | | | | 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.
* | Fix the create_moderation_tables migration to work with postgresqlChristopher Allan Webber2013-10-101-3/+3
|/ | | | Was comparing/assigning to integers... but that's not how postgres rolls!
* Fixing migration to account for new fields added to User modelChristopher Allan Webber2013-10-091-1/+5
| | | | | Uploaded and upload_limit were added after this migration was first written. Tricky!
* Merge remote-tracking branch 'tilly-q/OPW-Moderation-Update' into ↵Christopher Allan Webber2013-10-091-5/+9
|\ | | | | | | merge-tillyq-moderation
| * This was a quick update to clean up some of my templates and fix the formattingtilly-Q2013-10-081-5/+9
| | | | | | | | | | | | | | in some of my other bits of code. In migrations.py, I clarified the comments & fixed the code to stay within 80 columns. In each of the templates, I fixed the spacing as well to stay within 80 columns and I also corrected my improper uses of the trans tag to ensure that these pages can be translated correctly.
* | Adding a comment explaining what vR1 means.Christopher Allan Webber2013-10-081-0/+4
| | | | | | | | This commit sponsored by Kim Jin-hoon. Thank you!
* | Just fixing the order of migrations and a bit of whitespace.Christopher Allan Webber2013-10-081-38/+48
| | | | | | | | This commit sponsored by Glenn McGrath. Thank you!
* | Merge remote-tracking branch 'refs/remotes/tilly-q/OPW-Moderation-Update'Christopher Allan Webber2013-10-071-3/+199
|\| | | | | | | | | | | | | Conflicts: mediagoblin/templates/mediagoblin/user_pages/user.html mediagoblin/tests/test_auth.py mediagoblin/tests/test_submission.py
| * This was a very important update where I fixed a few small but fatal bugs in mytilly-Q2013-10-031-3/+3
| | | | | | | | | | | | | | | | | | code. I had removed the import of Privilege in mediagoblin.db.migrations, and this was still necessary and was causing errors. I also made it so that media deletion by moderators, through reports, actually fully deleted the media, rather than just deleting the database representation of the media. Lastly, I fixed a bug in migration that caused a fatal error on login because the UserBan user_id column was improperly named in it's creation by migration.
| * In this commit, I mostly did work on the migrations. Firstly, I droppped thetilly-Q2013-10-031-42/+129
| | | | | | | | | | | | | | | | | | vestigial columns from the User table (ie. status, email_verified, is_admin). Otherwise, I did a lot of work converting my existing migrations from high- level ORM commands to low-level SQL commands to ensure that the migrating will work regardless of what stage their instance is working in. I also re-integrated my two registered migrations into one. Because the migration became very long, I also added a lot of clarifying documentation.