Skip to content
Snippets Groups Projects
Commit c2bc340c authored by Travis Ralston's avatar Travis Ralston
Browse files

[MAJOR MIGRATION] Initial structure for a concept of "datastores"

**Caution**: This is a major migration that changes how files are tracked within the database. Although tested to ensure things won't go wrong, there is the possibility of something going haywire. It is recommended to run the following database commands before upgrading:

CREATE TABLE media_backup AS TABLE media;
CREATE TABLE thumbnails_backup AS TABLE thumbnails;

In the event you need to roll back, run the following:
DROP TABLE media;
DROP TABLE thumbnails;
CREATE TABLE media AS TABLE media_backup;
CREATE TABLE thumbnails AS TABLE thumbnails_backup;
DELETE FROM gomigrate WHERE migration_id = 7;

This will cause any files uploaded between upgrading and rolling back to be lost.

NOTE: The migration will take a while and runs on the first access of a file. If you have a lot of files, this could take a while.

-----

Fixes https://github.com/turt2live/matrix-media-repo/issues/106
Step towards https://github.com/turt2live/matrix-media-repo/issues/47
parent 022a757e
No related branches found
No related tags found
Loading
Showing
with 478 additions and 59 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment