SQL server compatibility
This commit is contained in:
parent
4ea14d567a
commit
4499dda2cc
@ -72,7 +72,11 @@ class Dmsf144 < ActiveRecord::Migration[4.2]
|
||||
t.change :lock_scope_cd, :integer, null: false
|
||||
# Data cleanup
|
||||
t.rename :dmsf_file_id, :entity_id
|
||||
t.remove :locked
|
||||
# TODO: The column cannot be removed on SQL server due to NOT NULL constraint.
|
||||
# The constraint's name is random and therefore cannot be easily removed.
|
||||
if ActiveRecord::Base.connection.adapter_name.downcase != 'sqlserver'
|
||||
t.remove :locked
|
||||
end
|
||||
end
|
||||
rename_table :dmsf_file_locks, :dmsf_locks
|
||||
# Not sure if this is the right place to do this, as its file manipulation, not database (strictly)
|
||||
|
||||
@ -66,7 +66,11 @@ class DmsfFileContainerRollback < ActiveRecord::Migration[4.2]
|
||||
# Make DB changes in dmsf_files
|
||||
change_table :dmsf_files, bulk: true do |t|
|
||||
t.remove_index %i[container_id container_type]
|
||||
t.remove :container_type
|
||||
# TODO: The column cannot be removed on SQL server due to NOT NULL constraint.
|
||||
# The constraint's name is random and therefore cannot be easily removed.
|
||||
if ActiveRecord::Base.connection.adapter_name.downcase != 'sqlserver'
|
||||
t.remove :container_type
|
||||
end
|
||||
t.rename :container_id, :project_id
|
||||
t.index :project_id
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user