Sha256: 478ff3a4d3e1dc033dce59b9860e2dd1c85e7a11c561ce631d7e4719455147d5

Contents?: true

Size: 625 Bytes

Versions: 7

Compression:

Stored size: 625 Bytes

Contents

class CreateAssetModels < ActiveRecord::Migration[4.2]

  def change
    create_table :js_configurations do |t|
      t.integer :shop_id, limit: 8
      t.string :label, default: 'Default'
      t.string :locale, default: 'en'
    end

    create_table :widget_configurations do |t|
      t.integer :shop_id, limit: 8
      t.string :label, default: 'Default'
      t.string :locale, default: 'en'
      t.string :background_color, default: '#FFFFFF'
    end

    add_foreign_key :js_configurations, :disco_app_shops, column: :shop_id
    add_foreign_key :widget_configurations, :disco_app_shops, column: :shop_id
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
disco_app-0.17.0 test/dummy/db/migrate/20160530160739_create_asset_models.rb
disco_app-0.18.0 test/dummy/db/migrate/20160530160739_create_asset_models.rb
disco_app-0.18.2 test/dummy/db/migrate/20160530160739_create_asset_models.rb
disco_app-0.18.3 test/dummy/db/migrate/20160530160739_create_asset_models.rb
disco_app-0.18.6 test/dummy/db/migrate/20160530160739_create_asset_models.rb
disco_app-0.18.4 test/dummy/db/migrate/20160530160739_create_asset_models.rb
disco_app-0.18.1 test/dummy/db/migrate/20160530160739_create_asset_models.rb