Sha256: c0c69ed01e3cd963fa76f594226f554a3bfe4ae0faa4090ff8068017199122cb
Contents?: true
Size: 722 Bytes
Versions: 16
Compression:
Stored size: 722 Bytes
Contents
class CreateSocialNetworkingLikes < ActiveRecord::Migration def change create_table :social_networking_likes do |t| t.integer :participant_id, null: false t.integer :item_id, null: false t.string :item_type, null: false t.timestamps end reversible do |dir| dir.up do execute <<-SQL ALTER TABLE social_networking_likes ADD CONSTRAINT fk_likes_participants FOREIGN KEY (participant_id) REFERENCES participants(id) SQL end dir.down do execute <<-SQL ALTER TABLE social_networking_likes DROP CONSTRAINT IF EXISTS fk_likes_participants SQL end end end end
Version data entries
16 entries across 16 versions & 1 rubygems