提交 edfec24c 编写于 作者: G GitLab Bot

Add latest changes from gitlab-org/gitlab@master

上级 208e2e30
...@@ -9,7 +9,7 @@ class RemoveAnalyticsRepositoryTableFksOnProjects < ActiveRecord::Migration[5.2] ...@@ -9,7 +9,7 @@ class RemoveAnalyticsRepositoryTableFksOnProjects < ActiveRecord::Migration[5.2]
with_lock_retries do with_lock_retries do
# Requires ExclusiveLock on all tables. analytics_* tables are empty # Requires ExclusiveLock on all tables. analytics_* tables are empty
remove_foreign_key :analytics_repository_files, :projects 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 remove_foreign_key :analytics_repository_file_commits, :projects
end end
end end
......
...@@ -8,7 +8,7 @@ class RemoveAnalyticsRepositoryFilesFkOnOtherAnalyticsTables < ActiveRecord::Mig ...@@ -8,7 +8,7 @@ class RemoveAnalyticsRepositoryFilesFkOnOtherAnalyticsTables < ActiveRecord::Mig
def up def up
with_lock_retries do with_lock_retries do
# Requires ExclusiveLock on all tables. analytics_* tables are empty # 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 remove_foreign_key :analytics_repository_file_commits, :analytics_repository_files
end end
end end
......
...@@ -7,7 +7,7 @@ class DropAnalyticsRepositoryFileEditsTable < ActiveRecord::Migration[5.2] ...@@ -7,7 +7,7 @@ class DropAnalyticsRepositoryFileEditsTable < ActiveRecord::Migration[5.2]
def up def up
# Requires ExclusiveLock on the table. Not in use, no records, no FKs. # 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 end
def down def down
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册