Lin Jen-Shin
4ee08b77bc
Updates from rubocop -a
2018-07-09 21:13:08 +08:00
Jarka Kadlecová
fa36101a7f
Use data_source_exists? instead of table_exists?
...
Use data_source_exists? where possible instead of table_exists? in order to be Rails5 compatible
2018-06-14 08:39:43 +02:00
Michael Kozono
080dba4a7e
Avoid dropping tables in test
...
And use :migration tag to use deletion strategy, and to avoid caching tables, and to lock into a particular schema.
Attempting to fix intermittent spec errors `PG::UndefinedTable: ERROR: relation "public.untracked_files_for_uploads" does not exist`.
2018-02-14 12:31:16 +01:00
Michael Kozono
67d310a1a6
Fix orphan temp table untracked_files_for_uploads
2018-02-12 10:44:15 -08:00
Michael Kozono
f917fc5d76
Fix last batch size equals max batch size error
2018-02-12 10:44:15 -08:00
Micaël Bergeron
2057a6acde
port of 594e6a0a625^..f74c90f68c6
2018-02-01 12:14:46 -05:00
Lin Jen-Shin
4f00a05152
Introduce PredicateMemoization cop and fix offenses
...
with StrongMemoize
2018-01-12 17:54:55 +08:00
Michael Kozono
fcbd2fe625
Follow symlinks
...
In particular, the Omnibus uploads directory is generally a symlink.
2017-12-04 12:57:44 -08:00
Michael Kozono
74b3870a95
Address Rubocop offenses
2017-12-01 15:26:42 -08:00
Michael Kozono
61a73cadb7
Get rid of timestamps on untracked files table
...
`updated_at` is now unnecessary and `created_at` is less useful due to removing the tracked field.
2017-12-01 15:26:42 -08:00
Michael Kozono
67b58ffdc3
Get rid of tracked field
...
It makes a debugging slightly easier, but is not necessary, and is a waste of resources.
2017-12-01 15:26:41 -08:00
Michael Kozono
a9155a94fe
Refactor
2017-12-01 15:26:41 -08:00
Michael Kozono
8def25d9f1
Fix datetime inserts on MySQL
2017-12-01 15:26:41 -08:00
Michael Kozono
edb5cac46c
Use bulk inserts
2017-12-01 15:26:41 -08:00
Michael Kozono
17ce21d74e
Use ionice absolute path
2017-12-01 15:26:41 -08:00
Michael Kozono
5552d1adf4
Log the find command used
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
10c660be00
Fix migration for pre-Postgres 9.5
2017-12-01 15:26:41 -08:00
Michael Kozono
7fd2643419
Fix Rubocop offenses
2017-12-01 15:26:41 -08:00
Michael Kozono
c25b7c0e3f
Speed up inserts
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
81f061d5a4
Fix ionice
prepend
2017-12-01 15:26:41 -08:00
Michael Kozono
c77a353dca
Remove unnecessary clearing
...
Since duplicate inserts are now ignored.
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