aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Image media type initial migration.Christopher Allan Webber2016-03-261-0/+36
| | | | | * mediagoblin/media_types/image/migrations/a98c1a320e88_image_media_type_initial.py: New file.
* Removing erronously installed print statement.Christopher Allan Webber2016-03-261-1/+0
| | | | | * mediagoblin/gmg_commands/alembic_commands.py (FudgedCommandLine.main): Removed call to print.
* Allow for passing in --with-plugins to the alembic gmg subcommand.Christopher Allan Webber2016-03-261-0/+19
| | | | | | | | | This allows plugin writers to easily take advantage off alembic's migration autogeneration support. * mediagoblin/gmg_commands/alembic_commands.py: Adjusted imports. (FudgedCommandLine.main, parser_setup): Add support for importing plugins when --with-plugins is passed in.
* Only run sqlalchemy-migrate migrations if we have to; separate foundationsChristopher Allan Webber2016-03-262-37/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Switch initial_revision alembic migration to make tables if they aren't thereChristopher Allan Webber2016-03-261-1/+401
| | | | | | | | | 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.
* Set target_metadata in alembic's env.py to Base.metadataChristopher Allan Webber2016-03-261-1/+2
| | | | | | | | 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.
* Update out script.py mako template to support branch_labelsChristopher Allan Webber2016-03-261-1/+3
| | | | | | | This is important (probably) for long-running plugin branches. * mediagoblin/db/migrations/script.py.mako: Updated to upstream Alembic version of this file.
* dbupdate updates to use plugin migrations if availableChristopher Allan Webber2016-03-262-49/+12
| | | | | | | | | 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.
* Ignore .eggs/ directoryChristopher Allan Webber2016-03-261-0/+1
|
* Add build_alembic_config, use it to add plugin migrations to alembic configChristopher Allan Webber2016-03-262-9/+40
|
* guix-env.scm: Comment on python-numpy pulling in texliveChristopher Allan Webber2016-03-241-1/+2
| | | | | | | | textlive-texmf is currently a dependency of texlive in Guix, and is very large. Users may want to know and disable this dependency, if they can bear limiting the media types they are developing with. * guix-env.scm: New comment on returned package.
* Remove requirement that audio/video dependencies must be installed for testsChristopher Allan Webber2016-03-185-64/+210
| | | | | | | Some tests were added for running audio and video submission tests in test_submission.py. Unfortunately these were not skipped if these dependencies were not installed. This patch attempts to fix that while leaving the tests intact.
* Merge branch 'master' of git.sv.gnu.org:/srv/git/mediagoblinBoris Bobrov2016-03-121-0/+1
|\
| * Add python-gst to guix-env.scmChristopher Allan Webber2016-03-091-0/+1
| |
* | Check all tags for existence before using themBoris Bobrov2016-03-091-8/+15
|/ | | | Fix bug 5401
* Fix module name for `gmg alembic` commandBoris Bobrov2016-03-082-2/+2
| | | | | | | | gmg_commands.alembic attempted to import from `alembic`. On python2.7 it resulted in import from itself. Rename alembic.py to alembic_commands.py and fix references to gmg_commands.alembic.
* Check tags for existence before using themBoris Bobrov2016-03-081-0/+5
| | | | Closes bug 5401
* Fix #5440 - Typo in blog viewsAndrew Browning2016-03-061-1/+1
|
* Commentary on where this hack on detecting no subcommand to Alembic comes fromChristopher Allan Webber2016-03-051-0/+2
|
* Fix comment ID links on blog media pageAndrew Browning2016-03-051-4/+5
| | | | | Change the comment ID behaviour and source of user_pages/blog_media.html to match user_pages/media.html as of #5376.
* Fix comment ID links on media comment report pageAndrew Browning2016-03-052-19/+13
| | | | | Change the comment ID behaviour and source of user_pages/report.html to match user_pages/media.html as of #5376.
* Add "gmg raw_alembic" command.Christopher Allan Webber2016-03-032-0/+60
| | | | | This allows you to dispatch to the "alembic" command line tool properly, but properly respecting MediaGoblin's own configuration.
* typo fix: Set sqlalchemy.url, not qlalchemy.urlChristopher Allan Webber2016-03-021-1/+1
|
* Remove old hack to support pre-0.7.5 Alembic versionsChristopher Allan Webber2016-03-022-4/+1
| | | | | Thanks to Jessica Tallon for pointing out this TODO and its associated hack could be removed.
* Remove version caps on sqlalchemy and alembic.Christopher Allan Webber2016-03-022-4/+4
| | | | | Code seems to pass fine after the cap is removed. Whatever dependency issues we were running into before don't seem to be an issue now.
* Fix #5432 - Comment report link doens't workAndrew Browning2016-03-021-1/+1
| | | | | This builds on work done for #5376 and associates the correct comment ID with comment report links.
* Fix #5435 - Bad comment links cause server errorAndrew Browning2016-03-021-0/+5
| | | | | This patch addresses an issue where a server error is caused by entering a non-existent comment ID in a media URL.
* Fix #5376 - Ensure links have correct IDJessica Tallon2016-03-017-24/+25
| | | | | | | 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 #5433 - Typo in decoratorsAndrew Browning2016-03-011-1/+1
|
* Fix #5431 - Typo in modelsAndrew Browning2016-03-011-1/+1
| | | | Fix a typo in models.py.
* Fixes #5421 - Ensures Report.object_id is nullableJessica Tallon2016-02-291-0/+33
| | | | | | | 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.
* Migration for #5415 - I forgot it, Doh!Jessica Tallon2016-02-291-0/+44
|
* Fix a typo in consolidate_reports migrationJessica Tallon2016-02-291-1/+1
|
* Fix #5415 - Deleted comments get removed properly when tombstonesJessica Tallon2016-02-292-0/+42
| | | | | | 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.
* Simply for the Notification.object_id migrationJessica Tallon2016-02-291-10/+0
|
* Missing perensJessica Tallon2016-02-291-1/+3
|
* Fixed issue introduced in previous migrationJessica Tallon2016-02-291-0/+39
|
* Change Notification.object_id to be ID of Comemnt not TextCommentJessica Tallon2016-02-297-28/+117
| | | | | | | | 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.
* No need for python-chardet in guix-env.scmChristopher Allan Webber2016-02-251-22/+0
| | | | That was *already* upstream in guix!
* Email debug mode on Python 3 was printing bytestring representation for ↵Christopher Allan Webber2016-02-251-1/+1
| | | | | | | subject body There's nothing useful about seeing b'foo\nbar\nbaz' printing to stdout. That's not what the user should get!
* guix-env.scm: Remove python-paste and python-pastescript, add python-chardetChristopher Allan Webber2016-02-251-75/+26
| | | | | python-paste and python-pastescript are now part of Guix proper. Working on getting python-chardet there as well.
* Crediting iyzsongChristopher Allan Webber2016-02-241-0/+1
|
* Fix sturm (Ben Sturmfels)' attributionChristopher Allan Webber2016-02-241-1/+1
|
* Fix ascii media type for Python 3. Fix by 宋文武 (iyzsong)Christopher Allan Webber2016-02-241-1/+1
|
* Oops, I forgot to include test_mgoblin_app_pdf.iniChristopher Allan Webber2016-02-241-0/+20
|
* Also switch "#!/usr/bin/env bash" to "#!/bin/sh" in compile-translations.shChristopher Allan Webber2016-02-241-1/+1
|
* Add guix-env.scm to launch a Guix environment for hacking.Christopher Allan Webber2016-02-241-0/+267
| | | | | (Thanks to David Thompson for help on the MediaGoblin packaging, which went into this a lot!)
* Change viewitems to itemsBoris Bobrov2016-02-231-1/+1
| | | | There is no viewitems in python3
* do not show error message when it's not a exceptionBoris Bobrov2016-02-231-1/+1
| | | | | | | | 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.
* Catch import error when text is used as a reason instead of pathBoris Bobrov2016-02-231-1/+11
| | | | | | | | 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.