SQL server compatibility
This commit is contained in:
parent
4499dda2cc
commit
9f4d940dd1
@ -74,9 +74,7 @@ class Dmsf144 < ActiveRecord::Migration[4.2]
|
||||
t.rename :dmsf_file_id, :entity_id
|
||||
# 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
|
||||
t.remove :locked if ActiveRecord::Base.connection.adapter_name.downcase != 'sqlserver'
|
||||
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)
|
||||
|
||||
@ -68,9 +68,7 @@ class DmsfFileContainerRollback < ActiveRecord::Migration[4.2]
|
||||
t.remove_index %i[container_id 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.remove :container_type if ActiveRecord::Base.connection.adapter_name.downcase != 'sqlserver'
|
||||
t.rename :container_id, :project_id
|
||||
t.index :project_id
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user