diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-02 09:08:55 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-02 09:08:55 +0000 |
commit | edfec24c1d7adefa03568c97b50f730a6196f9d2 (patch) | |
tree | 030fab3d8abd53a56acfc9f5c2d83d0aa9d70322 /db | |
parent | 208e2e308c444624e1d864c936ad7fe178ffc7e9 (diff) | |
download | gitlab-ce-edfec24c1d7adefa03568c97b50f730a6196f9d2.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
3 files changed, 3 insertions, 3 deletions
diff --git a/db/migrate/20200123090839_remove_analytics_repository_table_fks_on_projects.rb b/db/migrate/20200123090839_remove_analytics_repository_table_fks_on_projects.rb index a591596c74c..94fafe214c2 100644 --- a/db/migrate/20200123090839_remove_analytics_repository_table_fks_on_projects.rb +++ b/db/migrate/20200123090839_remove_analytics_repository_table_fks_on_projects.rb @@ -9,7 +9,7 @@ class RemoveAnalyticsRepositoryTableFksOnProjects < ActiveRecord::Migration[5.2] with_lock_retries do # Requires ExclusiveLock on all tables. analytics_* tables are empty remove_foreign_key :analytics_repository_files, :projects - remove_foreign_key :analytics_repository_file_edits, :projects + remove_foreign_key :analytics_repository_file_edits, :projects if table_exists?(:analytics_repository_file_edits) # this table might be already dropped on development environment remove_foreign_key :analytics_repository_file_commits, :projects end end diff --git a/db/migrate/20200123091422_remove_analytics_repository_files_fk_on_other_analytics_tables.rb b/db/migrate/20200123091422_remove_analytics_repository_files_fk_on_other_analytics_tables.rb index 60de2e9cb7f..e3e415dd0ad 100644 --- a/db/migrate/20200123091422_remove_analytics_repository_files_fk_on_other_analytics_tables.rb +++ b/db/migrate/20200123091422_remove_analytics_repository_files_fk_on_other_analytics_tables.rb @@ -8,7 +8,7 @@ class RemoveAnalyticsRepositoryFilesFkOnOtherAnalyticsTables < ActiveRecord::Mig def up with_lock_retries do # Requires ExclusiveLock on all tables. analytics_* tables are empty - remove_foreign_key :analytics_repository_file_edits, :analytics_repository_files + remove_foreign_key :analytics_repository_file_edits, :analytics_repository_files if table_exists?(:analytics_repository_file_edits) # this table might be already dropped on development environment remove_foreign_key :analytics_repository_file_commits, :analytics_repository_files end end diff --git a/db/migrate/20200123091854_drop_analytics_repository_file_edits_table.rb b/db/migrate/20200123091854_drop_analytics_repository_file_edits_table.rb index 3bb026727f4..59bf2dbdca3 100644 --- a/db/migrate/20200123091854_drop_analytics_repository_file_edits_table.rb +++ b/db/migrate/20200123091854_drop_analytics_repository_file_edits_table.rb @@ -7,7 +7,7 @@ class DropAnalyticsRepositoryFileEditsTable < ActiveRecord::Migration[5.2] def up # Requires ExclusiveLock on the table. Not in use, no records, no FKs. - drop_table :analytics_repository_file_edits + drop_table :analytics_repository_file_edits if table_exists?(:analytics_repository_file_edits) # this table might be already dropped on development environment end def down |