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.
When an item is deleted it should be removed from all collections, this commit
makes that happen. It's got two changes:
1. Adds the code so when an object is soft deleted, it's automatically removed from
all collection items
2. Add a migration to fix this issue for those who have tombstones (Graveyard objects)
in their collections because of this bug.
This commit requires you to run a migration
This commit fixes issue 5367 by updating the edit view to be compatible
with recent db migrations.
Signed-off-by: Jessica Tallon <tsyesika@tsyesika.se>
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.
Some sqlite migrations were failing due to some problems with sqlite. A
work around has been created for these however it does involve loading lots
of data into memory. If you have a large database you should consider trying
to move to postgres.
There was a problem where it was assuming the tablenames are the same
in master as they always were and that isn't the case. This would cause
it to raise an exception when trying to look up a table which didn't exist.
This fixes that by hardcoding the old tablenames in for this migration.
There were a number of tests where lots of models where being iterated through
and then at the end committing them. The problem is all the changes had to be
kept in memory or on disk somewhere before they were commit to the database. This
fix commits each change as it's being made, allowing resources to be freed and fixing
some of the inefficiencies
An exception was raised when a user tried to go to the authroization page
this occured when we changed the field names on the models from "user" to
actor. This patch corrects the query and resolves the error.
This patch fixes issue 5375 by replacing a function call that has
been removed in recent versions of PIL with the recommended
replacement.
(cherry picked from commit 564a48e018bcd786aa32b232cb7216be3ef3fb5e)
This adds a test and improves a previous test for the ability to read
someone elses feed. Previously it was not possible however this has
since been patched and this test checks for that.
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.
Seek tmp_media_file to 0 before attempting to discover the file type.
This prevents the following error when discovering mp4 video files.
"gst-stream-error-quark: This file is incomplete and cannot be played"