Sha256: fd7ac5647f12a2ab16ba9b8e34dd0fe6f73d304291688918c65933f756b6a927
Contents?: true
Size: 556 Bytes
Versions: 68
Compression:
Stored size: 556 Bytes
Contents
class RemovePositionUniqueConstraintFromTool < ActiveRecord::Migration def change reversible do |dir| dir.up do execute <<-SQL ALTER TABLE bit_core_tools DROP CONSTRAINT IF EXISTS bit_core_tool_position SQL end dir.down do # make deferrable so that positions can be updated execute <<-SQL ALTER TABLE bit_core_tools ADD CONSTRAINT bit_core_tool_position UNIQUE (position) DEFERRABLE INITIALLY IMMEDIATE SQL end end end end
Version data entries
68 entries across 68 versions & 1 rubygems