Commit Graph

16 Commits

Author SHA1 Message Date
03cba8c0f1 Fix specs after rebase
Later migrations added fields to the EE DB which were used by factories which were used in these specs.

And in CE on MySQL, a single appearance row is enforced.

The migration and migration specs should not depend on the codebase staying the same.
2017-12-06 09:34:25 -08:00
602f6bc89c Make sure empty uploads doesn’t break anything 2017-12-04 12:59:41 -08:00
473ddfb453 Don’t recreate deleted uploads 2017-12-01 15:26:42 -08:00
edb5cac46c Use bulk inserts 2017-12-01 15:26:41 -08:00
87529ce582 Move temp table creation into the prepare job
* Hopefully fixes spec failures in which the table doesn’t exist
* Decouples the background migration from the post-deploy migration, e.g. we could easily run it again even though the table is dropped when finished.
2017-12-01 15:26:41 -08:00
7fd2643419 Fix Rubocop offenses 2017-12-01 15:26:41 -08:00
dd8680a7ae Drop temporary tracking table when finished 2017-12-01 15:26:41 -08:00
d530085685 Refactor specs 2017-12-01 15:26:41 -08:00
3dc0b118ec Store paths relative to CarrierWave.root
So the path on source installs cannot be too long for our column.

And fix the column length test since Route.path is limited to 255 chars, it doesn’t matter how many nested groups there are.
2017-12-01 15:26:41 -08:00
a210cb6b82 Rename table to untracked_files_for_uploads 2017-12-01 15:26:41 -08:00
2ab3031bd3 Refactor, no change in behavior 2017-12-01 15:26:41 -08:00
7c43692f68 Make regexes more readable 2017-12-01 15:26:41 -08:00
ffbaf19fe8 Fix Rubocop offenses 2017-12-01 15:26:41 -08:00
1bae010b63 Calculate checksums
by copy-pasting in the whole `Upload` class.

Also, fix `Namespace` `model_type` (it should not be `Group`).
2017-12-01 15:26:40 -08:00
3a0ad99d59 Add untracked files to uploads 2017-12-01 15:26:40 -08:00
d6435b68c4 Add TrackUntrackedUploads post-deploy migration
To create the table, and schedule the background migration that begins the work.
2017-12-01 15:26:40 -08:00