Jessica Tallon
c1d27aa019
Add a more verbose GenericForeignKey implementation
2015-05-26 16:48:59 +02:00
Jessica Tallon
e8b44d7c09
Add migration to remove ActivityIntermediator
...
Migration to drop the table and removal of it from the model as it has
now been superseeded by the GenericForeignKey field.
2015-05-26 16:48:59 +02:00
Jessica Tallon
bfe1e8ce88
Migrate Activity to using the new GenericForeignKey
2015-05-26 16:48:58 +02:00
Jessica Tallon
641ae2f1e1
Add GenericForeignKey field and reference helper model
2015-05-26 16:48:58 +02:00
Christopher Allan Webber
941b9abbb0
Fix the token issues in the migration
...
There's no .id on access/request token tables, so fixed to use the .token field.
Also switched a reference of client_table -> rt_table
2015-02-17 20:04:15 -06:00
Christopher Allan Webber
d180c131c3
acess_token->access_token
2015-02-17 19:44:58 -06:00
Christopher Allan Webber
f3c5d01199
Fixing typo: notifiction->notification
2015-02-17 19:42:43 -06:00
Christopher Allan Webber
e0713d9ccf
This one should be dt_to_utc, not db_to_utc, I believe
2015-02-17 19:42:11 -06:00
Jessica Tallon
d705f3b760
Fix #1065 - Migrate from native datetimes to UTC
2015-02-15 17:17:01 +01:00
Jessica Tallon
ed48454558
Merge branch 'location'
...
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.
2014-10-09 19:20:13 +01:00
Jessica Tallon
c0434db469
Add location model and migrations
2014-10-09 19:16:54 +01:00
Jessica Tallon
9a1fc423ac
Merge branch '905-activities'
...
Add Activity and Generator models which allow for
activities to be created. This now works with the
feed API.
2014-10-07 10:01:38 +01:00
Jessica Tallon
6d36f75f84
Fix all the unit tests and clean up code
2014-10-06 11:48:03 +01:00
Christopher Allan Webber
36e27c4b76
Fix migrations on Python 2.
...
This commit sponsored by Loïc Grobol. Thank you!
2014-09-30 16:34:15 -05:00
Christopher Allan Webber
f6bad0eb26
Merge branch 'master' into merge-python3-port
...
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
2014-09-16 14:01:43 -05:00
Jessica Tallon
b61519ce53
Only have Model.activity for activity compatable objects/targets
2014-09-03 15:58:40 +01:00
Jessica Tallon
0421fc5ee8
Fix migrations and refactor object_type
...
- 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
2014-09-02 16:38:52 +01:00
Jessica Tallon
ce46470c02
Add ActivityIntermediator table and refactor some of Activity model
...
- 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.
2014-08-27 15:20:27 +01:00
Jessica Tallon
b949201152
Create activity model and add activity creation
...
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.).
2014-08-22 23:18:01 +01:00
Christopher Allan Webber
a7800e6da8
Fix a python2.6 compatibility issue. Removing a dict comprehension.
...
This commit sponsored by Christopher Beppler. Thanks!
2014-08-18 10:40:08 -05:00
Christopher Allan Webber
3b104bbcef
Elrond keeps pointing out places I should "is not None" at :)
2014-08-08 13:24:59 -05:00
Christopher Allan Webber
113d1a280e
Okay, we don't know that indexes are falsey, so let's make it clearer. Yeek!
2014-08-08 13:18:57 -05:00
Christopher Allan Webber
72f42a408d
this negation needs parens.
2014-08-08 13:12:33 -05:00
Christopher Allan Webber
f2a6db9088
Pull the indexes out of the dictionary directly
...
Instead of checking for their keys and pulling them out later, that is.
2014-08-08 11:39:44 -05:00
Christopher Allan Webber
ed0b981edc
If the constraint already exists, roll back to a sane state.
2014-08-08 09:50:16 -05:00
Christopher Allan Webber
1de794c6f0
Explaining why we're committing mid-migration
2014-08-08 09:47:33 -05:00
Christopher Allan Webber
e6288a68e1
Only add the constraint if we need to. Catch an exception if we don't.
...
Also, updating the comment about sqlite being crazy :)
2014-08-07 16:29:45 -05:00
Christopher Allan Webber
3a8d0e145e
Document both migrations, comment out old migration
2014-08-07 15:01:09 -05:00
Christopher Allan Webber
bb12fb807e
Add a new migration which removes/fixes the old migration
...
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!
2014-08-07 14:57:46 -05:00
Jessica Tallon
d70b7a5167
Fix issue where create_uuid doesn't exist nor used
2014-07-22 23:13:15 +01:00
Jessica Tallon
2b7b9de32e
Make sure new media has a new uuid added on
2014-07-22 23:13:14 +01:00
Jessica Tallon
e590179ab6
Adds migration on MediaEntry to add uuid
2014-07-22 23:13:13 +01:00
Jessica Tallon
892eed590f
Fix #894 - index User.username field
...
This commit sponsored by Emily O'Leary. Thank you!
2014-07-17 10:21:29 -05:00
Berker Peksag
e2cb0f86fe
Remove sqlalchemy-migrate imports from the codebase. Do not touch tests yet.
2014-06-27 03:17:12 +03:00
Christopher Allan Webber
713dde5b9d
Adding comments in the migration explaining a bit what's going on.
...
This commit sponsored by Philip Horger. Thank you!
2014-06-11 11:09:28 -05:00
Christopher Allan Webber
987a63514f
Explicitly set the column names to "user" and "privilege"
2014-06-11 11:01:17 -05:00
Christopher Allan Webber
c56a88b43e
Switch "user_id" to "privilege" and "privilege_id" to "user".
...
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.)
2014-06-10 18:02:34 -05:00
Christopher Allan Webber
70bceff85f
Merge remote-tracking branch 'refs/remotes/tilly-q/ticket-874' into mergetest
...
Conflicts:
mediagoblin/db/migrations.py
2014-06-10 16:48:45 -05:00
Berker Peksag
e49b7e02b2
Use six.text_type instead of unicode().
...
I will be switch to use ``from __future__ import unicode_literals`` later.
2014-06-02 20:59:28 +03:00
tilly-Q
c8abeb58af
Set a default value to MediaEntry.media_metadata
2014-05-14 11:56:59 -04:00
tilly-Q
9adef07e8f
Made the columns properly referenced in models and migrations.
2014-04-23 14:59:53 -04:00
tilly-Q
7918f86ac0
Renamed the columns on core__privileges_users table so that they are unique and
...
will not cause any more problems.
2014-04-22 14:36:23 -04:00
tilly-Q
0bfb4089cc
Changed the name of the metadata column
2014-04-21 12:11:11 -04:00
tilly-Q
9f3dc83a6c
Moved the metadata column to MediaEntry rather than MediaFile
2014-04-21 12:11:11 -04:00
tilly-Q
2dd966b5e2
In this commit, I added a new column which will be used for RDFa metadata of
...
media.
2014-04-21 12:07:59 -04:00
tilly-Q
9412fffef1
I went through the code and just removed some blank spaces. I also looked it
...
thru and it looked great.
2013-11-19 15:14:14 -05:00
Josie
7dfcc538d3
Addressed ticket number 630 by removing MediaEntry.collected
2013-11-18 20:05:15 -05:00
Christopher Allan Webber
0c875e1e96
Renaming replace_table to replace_table_hack and documenting why it's a hack
...
We'd still prefer people use other solutions when possible!
This commit sponsored by Michał Masłowski. Thank you!
2013-10-10 14:22:38 -05:00
Christopher Allan Webber
2c4decf260
Merge remote-tracking branch 'tilly-q/merge-tillyq-moderation' into merge-tillyq-moderation
2013-10-10 14:06:07 -05:00
Christopher Allan Webber
f1318b59c8
Fix the create_moderation_tables migration to work with postgresql
...
Was comparing/assigning to integers... but that's not how postgres rolls!
2013-10-10 11:28:59 -05:00