Sha256: 4eea79124f363a4e1929dc19a8c0c7159b75b85224b4d017bbb55abdb68b95db
Contents?: true
Size: 614 Bytes
Versions: 5
Compression:
Stored size: 614 Bytes
Contents
class AddArmIdToBitCoreTools < ActiveRecord::Migration def change add_column :bit_core_tools, :arm_id, :integer, null: false reversible do |dir| dir.up do # add foreign key constaint execute <<-SQL ALTER TABLE bit_core_tools ADD CONSTRAINT fk_bit_core_tools_arms FOREIGN KEY (arm_id) REFERENCES arms(id) SQL end dir.down do # remove foreign key constaint execute <<-SQL ALTER TABLE bit_core_tools DROP CONSTRAINT fk_bit_core_tools_arms SQL end end end end
Version data entries
5 entries across 5 versions & 1 rubygems