Sha256: b2d914736cfd74ff21c65564ef4ba1c41052aaa5bc05a3f1b6c6bae64c49deea

Contents?: true

Size: 1.01 KB

Versions: 78

Compression:

Stored size: 1.01 KB

Contents

# This migration comes from bit_player (originally 20140305201300)
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

78 entries across 78 versions & 2 rubygems

Version Path
think_feel_do_engine-3.22.9 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.22.8 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.22.7 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.22.6 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.22.5 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.22.4 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.22.2 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.22.1 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.22.0 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.21.2 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.21.1 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.21.0 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.20.1 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.19.9 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.19.8 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.19.7 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.19.6 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.19.5 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.19.4 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb
think_feel_do_engine-3.19.3 db/migrate/20140305220122_create_bit_player_content_providers.bit_player.rb