aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/models.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix some unused imports and local variables.Ben Sturmfels2021-09-231-6/+6
|
* Apply pyupgrade --py36-plus.Ben Sturmfels2021-09-231-9/+9
| | | | This removes some 'u' prefixes and converts simple format() calls to f-strings.
* Remove remaining imports/calls to six not automatically removed by pyupgrade.Ben Sturmfels2021-03-051-2/+1
|
* Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.Ben Sturmfels2021-03-051-44/+39
|
* Merge branch 'transcoding_progress'Boris Bobrov2018-07-121-2/+3
|\ | | | | | | This probably broke stuff
| * Add main_transcoding_progress column migrationvijeth-aradhya2017-08-221-0/+1
| | | | | | | | | | | | | | This field is required to store the progress of the default resolution of the media. So, we now store the total progress of transcoding the video in 'transcoding_progress' and progress of transcoding the default resolution in 'main_transcoding_progress'.
| * Fix percentage reportingvijeth-aradhya2017-08-101-2/+2
| | | | | | | | | | | | | | Report transcoding_progress as the overall percent of all resolutions. Modify Logging. Closes #6
* | Merge remote-tracking branch 'gsoc2016/Subtitle-1'Boris Bobrov2018-07-101-1/+26
|\ \
| * | Subtitle built over attachments : workingsaksham11152016-07-191-1/+26
| | |
* | | Added tags in API (view them and edit them)Romain Porte2017-11-121-1/+10
| |/ |/|
* | Revert "fixed bug #728"Boris Bobrov2016-08-161-3/+3
| | | | | | | | | | | | This reverts commit dbb86ffbbf25651330266435752a6a0422cfb6e5. It caused bug 5469
* | Do not try to get private attributes for commentsBoris Bobrov2016-08-081-1/+8
| | | | | | | | Most probably, they are sqlalchemy's!
* | Adding compatibility stuff for themesBoris Bobrov2016-07-311-11/+32
| | | | | | | | | | | | | | During our migration to federation some interfaces were changed. We should not have done that so fast. Provide a compatibility layer so that old themes work
* | fixed bug #728Boris Bobrov2016-07-251-3/+3
|/
* Fix #5376 - Ensure links have correct IDJessica Tallon2016-03-011-13/+2
| | | | | | | This ensures that links to comments have the correct ID (the ID of the Comment object) as well as fixing deletion on reports and fixing a few other little things. I hope this fixes the #5376 issue, though cannot reproduce so unable to confirm.
* Fix #5431 - Typo in modelsAndrew Browning2016-03-011-1/+1
| | | | Fix a typo in models.py.
* Fix #5415 - Deleted comments get removed properly when tombstonesJessica Tallon2016-02-291-0/+11
| | | | | | The original wrapper existed and should be been removed, this fix now ensures the TextComment removes the Comment wrapper to prevent the deleted (comments which are tombstones) existing.
* Fix #5369 - Broken activities cause issues in migrationsJessica Tallon2016-01-061-1/+1
| | | | | | | | | | | This fixes a few bugs in previous migrations and then also introduces a new migration for those who had run the previous migrations without encountering the bugs to ensure that the database is in the same state as those who ran it after the bug fixes introduced in this commit. The commit also ensures that all activities are valid, they should be but they might not be so checks, from now on we should be able to assume that all activities will always be valid.
* Fix #5363 - Collections don't serialize correctlyJessica Tallon2015-11-251-1/+1
|
* Fix #5354 & #5355 - Fix Graveyard.serializeJessica Tallon2015-11-231-7/+14
| | | | | | | | | Graveyard.serialize raised an exception as the deleted datetime objects where not being converted to strings for json encoding. It also didn't deal with the case when there was an actor, it now calls the actor's serialize method as it should. Thanks to Alyeph who provided the patches for both of these.
* Use urljoin to create proper feed media URLsayleph2015-11-191-2/+3
|
* Comment changes for federationJessica Tallon2015-10-201-149/+138
| | | | | | | | | | | | | | This adds a new Comment link table that is used to link between some object and then the comment object, which can be more or less any object in Mediagoblin. The MediaComment has been renamed to TextComment as that more aptly describes what it is. There is migrations for these changes. There is also the conslidation of the Report tables into a single Report table, the same with the Notification objects. This is because both of them split out MediaEntry and Comment versions into their own polymorphic versions from a base, this is no longer a meaningful distinction as comments can be anything.
* Add public_id fixes throughout the codeJessica Tallon2015-10-071-1/+3
| | | | | | | | This adds several things, mainly code which checks for the public id and if it doesn't exist generating it where it can. This is to because we need to keep the public_id to be able to effectively soft delete models. This also adds a public_id field to the Activity along with a migration.
* Add Graveyard modelJessica Tallon2015-10-071-24/+66
| | | | | | | | | | This adds the Graveyard model which is used when a model is deleted, it stores the important "shell" information on the model so it can hard-delete the real object. It also remaps the GenericModelReference references to the new Graveyard model. This also moves the soft deletion setting from __model_args__ to "deletion_mode" on the model.
* Add the __model_args__ deletion codeJessica Tallon2015-10-071-1/+28
| | | | | | | | This adds the "deleted" fields to the models as well as a new __model_args__ section whcih supports the option for changing the deletion type. Deletion is now handled by choosing a deletion method based on the __model_args__["deletion"] setting, for example if it's soft deletion it will call Model.soft_delete()
* Collection changes and migration for federationJessica Tallon2015-10-071-39/+81
| | | | | | | - Adds a "type" column to the Collection object and allows the CollectionItem model to contain any object. - Changes "items" to "num_items" as per TODO - Renames "uploader", "creator" and "user" to a common "actor" in most places
* Fix some unit tests and bugsJessica Tallon2015-08-241-21/+22
| | | | | | | | | | | | | | | | | | This fixes a lot of the issues with the LocalUser changes that were merged recently. There was a problem where the attributes of LocalUser were not being eagerly loaded and because the Session was detached an exception was being raised when they were accessed. This also fixes some typo's which were introduced. Finally this adds a temporary fix for a potential SQLAlchemy bug, this is a bug where doing: User.query.filter(LocalUser.username == "some_username").first() does NOT yeild a user with the username "some_username" but all users on the site. The temp fix is to just query the LocalUser, this should be resolved when bug is confirmed and fixed upstream.
* Fix serialization after model changesJessica Tallon2015-08-201-4/+6
| | | | | | After the recent model changes there were some bugs which were introduced into the serialization methods of the models. This commit fixes those issues.
* Change structure of MediaEntry and add migrationJessica Tallon2015-08-191-10/+9
| | | | | | This makes the changes needed for federating MediaEntry objects as well as adding the migration and necessary methods to get the public_id just in time (JIT).
* Add the user models to the MODELS listJessica Tallon2015-07-311-7/+7
| | | | | | | | This adds the two new user models (LocalUser and RemoteUser) to the MODELS list that is in models.py. This stops the strange bug that occurs if you migrate a fresh database, the two models don't exist however migrating an existing database would create them as the migrations exist.
* Add polymorphic properties to UserJessica Tallon2015-07-311-0/+16
| | | | | | | | | | This adds the ability to search for any user based on the generic User case and be given back the specific LocalUser or RemoteUser. This will require any code using the model to look which attributes they are searching on and specify the specific User model they are on if they're not on the generic User model. This will also require new users to be created with LocalUser.
* Add LocalUser and RemoteUser and migrationJessica Tallon2015-07-311-58/+97
|
* Fix some problems with activity mixins and migrationsJessica Tallon2015-05-261-13/+14
|
* Add a more verbose GenericForeignKey implementationJessica Tallon2015-05-261-65/+36
|
* Remove deprecated fields and fix activity creation in toolsJessica Tallon2015-05-261-9/+0
|
* More fixed recommended by ElrondJessica Tallon2015-05-261-11/+8
| | | | | | | This fixes the problem where GenericForeignKey could only be used with models that are in the core of Mediagoblin, it now can be used with any model that SQLAlchemy knows about, including plugins. This also fixes some small bugs caused by incorrect ordering of params into a function.
* Add some fixes Elrond suggested and doc stringsJessica Tallon2015-05-261-14/+41
|
* Add migration to remove ActivityIntermediatorJessica Tallon2015-05-261-56/+0
| | | | | Migration to drop the table and removal of it from the model as it has now been superseeded by the GenericForeignKey field.
* Fix the GenericForeignKey implementationJessica Tallon2015-05-261-22/+36
|
* Migrate Activity to using the new GenericForeignKeyJessica Tallon2015-05-261-46/+26
|
* Add GenericForeignKey field and reference helper modelJessica Tallon2015-05-261-2/+78
|
* Fix #1065 - Migrate from native datetimes to UTCJessica Tallon2015-02-151-20/+20
|
* Change 'federation' name to 'api' which is more suitableJessica Tallon2015-02-151-7/+7
|
* Fix #1052 - Make activity cascade delete work when deleting a userJessica Tallon2015-01-271-1/+2
|
* Fix #1077 - Fix updating comment via API and add testJessica Tallon2014-12-161-22/+16
|
* Fix #1053 - Add height and width attributes and MetadataProcess taskJessica Tallon2014-12-111-0/+16
| | | | | | | | Added "height" and "width" attributes to "image" and "fullImage" in the API where possible. The height and width of images wasn't being stored anywhere so I've created a task to add or update the metadata on images and also started adding those to new images when they're submitted in the InitialProcessor.
* Fix #1049 - name renamed to displayName for LocationJessica Tallon2014-12-051-3/+3
|
* Fix #1040 - Comments should have published attributeJessica Tallon2014-11-271-1/+4
|
* Fix unicode handling in "gmg addmedia".Berker Peksag2014-11-221-1/+5
|
* Fix #1025 - Make API IDs IRIsJessica Tallon2014-11-211-11/+28
|