remove_foreign_key:analytics_repository_file_edits,:projectsiftable_exists?(:analytics_repository_file_edits)# this table might be already dropped on development environment
remove_foreign_key_if_exists(:analytics_repository_file_edits,:projects)iftable_exists?(:analytics_repository_file_edits)# this table might be already dropped on development environment
@@ -5,20 +5,21 @@ class RemoveAnalyticsRepositoryFilesFkOnOtherAnalyticsTables < ActiveRecord::Mig
...
@@ -5,20 +5,21 @@ class RemoveAnalyticsRepositoryFilesFkOnOtherAnalyticsTables < ActiveRecord::Mig
DOWNTIME=false
DOWNTIME=false
disable_ddl_transaction!
defup
defup
# Requires ExclusiveLock on all tables. analytics_* tables are empty
with_lock_retriesdo
with_lock_retriesdo
# Requires ExclusiveLock on all tables. analytics_* tables are empty
remove_foreign_key_if_exists(:analytics_repository_file_edits,:analytics_repository_files)iftable_exists?(:analytics_repository_file_edits)# this table might be already dropped on development environment
remove_foreign_key:analytics_repository_file_edits,:analytics_repository_filesiftable_exists?(:analytics_repository_file_edits)# this table might be already dropped on development environment