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