| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
This removes some 'u' prefixes and converts simple format() calls to f-strings.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Original of the video was not saved because info about it was not
written to the database. Fixed that.
Also removed original video from get_all_media listing. The method is
weird, we should evaluate whether it is video-specific and how to
generalize it.
|
| |
|
|\
| |
| |
| | |
This probably broke stuff
|
| |
| |
| |
| |
| |
| |
| | |
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'.
|
| |
| |
| |
| | |
Closes #8
|
| |\
| | |
| | |
| | |
| | | |
Add multiple video qualities feature
See merge request !2
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Report transcoding_progress as the overall percent of all resolutions.
Modify Logging.
Closes #6
|
| | |
| | |
| | |
| | |
| | | |
Returns all available qualties of a media with it's dimensions and
resolution label.
|
|\ \ \ |
|
| | | | |
|
| | | | |
|
| | | | |
|
| |_|/
|/| | |
|
| |/
|/|
| |
| | |
We dropped mongodb a long time ago
|
| |
| |
| |
| |
| |
| | |
In https://bitbucket.org/zzzeek/alembic/issues/419/ we were suggested
use connection instead of engine. This should fix an issue reported
via ml.
|
| |
| |
| |
| |
| |
| | |
This reverts commit dbb86ffbbf25651330266435752a6a0422cfb6e5.
It caused bug 5469
|
| |
| |
| |
| | |
Most probably, they are sqlalchemy's!
|
| |
| |
| |
| |
| |
| |
| | |
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
|
|/ |
|
|
|
|
|
| |
* mediagoblin/db/migrations.py: Import migrate if available; if not
print a warning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The goal is to get things to the point where Alembic can run on its own
for new databases and initialize the whole database on its own. There
are risks to not doing so, see #5413 for details.
There's a lot more here that could removed or cleaned up once
sqlalchemy-migrate is *completely* removed in the future.
* mediagoblin/db/migration_tools.py (MigrationManager.foundations):
Removed attribute.
(MigrationManager.populate_table_foundations): Removed method.
(MigrationManager.init_or_migrate): Removed call to deprecated method.
(populate_table_foundations): New function, refactored from former
MigrationManager method of same name.
* mediagoblin/gmg_commands/dbupdate.py: Import populate_table_foundations.
(DatabaseData.foundations): Remove attribute.
(DatabaseData.make_migration_manager): Adjust instantiation of
MigrationManager.
(gather_database_data): Move out the work of building up foundations data.
(run_foundations): New method, incorporating logic for gathering and
running foundations which was previously spread across other
functions and methods.
(run_alembic_migrations): Remove deprecated comment.
(run_dbupdate): Only run sqlalchemy migrations if we have to.
Also run run_foundations if we are setting up this database for the
first time.
(sqam_migrations_to_run): New method.
|
|
|
|
|
|
|
|
|
| |
This is a necessary step towards deprecating sqlalchemy-migrate.
* mediagoblin/db/migrations/versions/52bf0ccbedc1_initial_revision.py
(upgrade): Update for adding tables. Mostly generated via Alembic's
autogenerate tools.
(downgrade): Added a comment.
|
|
|
|
|
|
|
|
| |
This allows us to make use of automatically generated migrations, at
least for core.
* mediagoblin/db/migrations/env.py (target_metadata): Switch to gmg's
Base.metadata.
|
|
|
|
|
|
|
| |
This is important (probably) for long-running plugin branches.
* mediagoblin/db/migrations/script.py.mako: Updated to upstream
Alembic version of this file.
|
|
|
|
|
|
|
|
|
| |
This makes use of the recently added "build_alembic_config" tool and
removes AlembicMigrationManager.
* mediagoblin/db/migration_tools.py (AlembicMigrationManager): Removed.
* mediagoblin/gmg_commands/dbupdate.py (run_alembic_migrations):
Adjusted to use recently added build_alembic_config tool.
|
| |
|
| |
|
|
|
|
|
| |
Thanks to Jessica Tallon for pointing out this TODO and its associated
hack could be removed.
|
|
|
|
|
|
|
| |
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 a typo in models.py.
|
|
|
|
|
|
|
| |
It seems there was a commit for a while where the migration was
making Report.object_id NOT NULL and this caused an errror when
a report deleted the associated object (media). This migrtion
checks it's nullable and if not, alters it so it is.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This shouldn't really effect much but it is a needed change for the future
this changes the Notification.object_id to be the ID of the Comment (the link
table to the comment object) rather than TextComment (the comment object itself).
This is needed as now comments can be other things, other than TextComment.
|
|
|
|
|
|
|
|
| |
Gah, the previous patch was not enough! We cannot use text, we can only
use exception with a special attribute.
Lets return safe None for now an resolve this properly later, when we're
not in the freeze.
|
|
|
|
|
|
|
|
| |
fail_error was used in import, but due to some changes text could appear
there and it caused an error.
There is little sense now to remove these text messages because they are
probably in databases already, so just ignore import errors.
|
|
|
|
|
| |
This update changes migrations to wrap db.execute results in a list to
keep the connection from closing for sqlite migrations.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for alembic
For some reason the alembic connection wasn't seeing any tables that existed
however the existing connection works well and we shouldn't be creating a brand
new one when we have one ready to use. I've used a little bit of a hack due to our
old version of alembic.
After 0.7.5 of alembic it offers a `Config.attributes` dictionary which is designed to
allow you to pass your connection/engine/whatever to the env.py config script so you're
not required to create new ones. As we're on an older version I just create a dictionary
with the same name and use it as otherwise documented. It seems this is the suggested
fix for #5395 and it fixes #5398 too.
|
|
|
|
|
|
|
| |
When a user deleted media or other objects any notificationn objects or reports
would cause errors as the object doesn't exist anymore. This now removes them or
sets them to None as expected by the code. This also adds some code to the base
deletion code to make sure this happens when an object is deleted.
|
|
|
|
|
|
| |
Just like we would have in sqlalchemy-migration inspect_table works and
is better than constantly redefining a table in the migration. This switches
the migration to use that method.
|
|
|
|
|
|
| |
The database connection was being set in a alembic.ini config file, if the user
had specified postgres the "sqlite" connection URL in alembic.ini would override
that. We probably should look into this more so i've opened #5395.
|