Sha256: 21b30ac93283e00d930d10c3e9337be2add2ac1e8109514cf4560d14dfbae3a5
Contents?: true
Size: 972 Bytes
Versions: 18
Compression:
Stored size: 972 Bytes
Contents
class CreateBitPlayerContentProviders < ActiveRecord::Migration def change create_table :bit_player_content_providers do |t| t.string :type, null: false t.string :source_content_type t.integer :source_content_id t.references :bit_player_content_module, null: false t.integer :position, null: false, default: 1 t.timestamps end add_index :bit_player_content_providers, :bit_player_content_module_id, name: "content_module_index" reversible do |dir| dir.up do execute <<-SQL ALTER TABLE bit_player_content_providers ADD CONSTRAINT fk_content_providers_modules FOREIGN KEY (bit_player_content_module_id) REFERENCES bit_player_content_modules(id) SQL end dir.down do execute <<-SQL ALTER TABLE bit_player_content_providers DROP CONSTRAINT fk_content_providers_modules SQL end end end end
Version data entries
18 entries across 18 versions & 1 rubygems