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
|
t.rename :dmsf_file_id, :entity_id
|
||||||
# TODO: The column cannot be removed on SQL server due to NOT NULL constraint.
|
# 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.
|
# The constraint's name is random and therefore cannot be easily removed.
|
||||||
if ActiveRecord::Base.connection.adapter_name.downcase != 'sqlserver'
|
t.remove :locked if ActiveRecord::Base.connection.adapter_name.downcase != 'sqlserver'
|
||||||
t.remove :locked
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
rename_table :dmsf_file_locks, :dmsf_locks
|
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)
|
# 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]
|
t.remove_index %i[container_id container_type]
|
||||||
# TODO: The column cannot be removed on SQL server due to NOT NULL constraint.
|
# 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.
|
# The constraint's name is random and therefore cannot be easily removed.
|
||||||
if ActiveRecord::Base.connection.adapter_name.downcase != 'sqlserver'
|
t.remove :container_type if ActiveRecord::Base.connection.adapter_name.downcase != 'sqlserver'
|
||||||
t.remove :container_type
|
|
||||||
end
|
|
||||||
t.rename :container_id, :project_id
|
t.rename :container_id, :project_id
|
||||||
t.index :project_id
|
t.index :project_id
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user