Commit graph

17 commits

Author SHA1 Message Date
Jarka Kadlecová
153ea18301 Refactor matchers for background migrations 2018-01-05 13:40:31 +01:00
Michael Kozono
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
Michael Kozono
602f6bc89c Make sure empty uploads doesn’t break anything 2017-12-04 12:59:41 -08:00
Michael Kozono
473ddfb453 Don’t recreate deleted uploads 2017-12-01 15:26:42 -08:00
Michael Kozono
edb5cac46c Use bulk inserts 2017-12-01 15:26:41 -08:00
Michael Kozono
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
Michael Kozono
7fd2643419 Fix Rubocop offenses 2017-12-01 15:26:41 -08:00
Michael Kozono
dd8680a7ae Drop temporary tracking table when finished 2017-12-01 15:26:41 -08:00
Michael Kozono
d530085685 Refactor specs 2017-12-01 15:26:41 -08:00
Michael Kozono
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
Michael Kozono
a210cb6b82 Rename table to untracked_files_for_uploads 2017-12-01 15:26:41 -08:00
Michael Kozono
2ab3031bd3 Refactor, no change in behavior 2017-12-01 15:26:41 -08:00
Michael Kozono
7c43692f68 Make regexes more readable 2017-12-01 15:26:41 -08:00
Michael Kozono
ffbaf19fe8 Fix Rubocop offenses 2017-12-01 15:26:41 -08:00
Michael Kozono
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
Michael Kozono
3a0ad99d59 Add untracked files to uploads 2017-12-01 15:26:40 -08:00
Michael Kozono
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