Sha256: 06be75a695f2cc5fdb41cc2732bed05c9944845cd666314b09b4dc9bc2687277

Contents?: true

Size: 617 Bytes

Versions: 2

Compression:

Stored size: 617 Bytes

Contents

class CreateBetaFeatureSettings < ActiveRecord::Migration[5.1]
  def up
    if !ActiveRecord::Base.connection.data_source_exists? 'beta_feature_settings'
      create_table :beta_feature_settings, if_not_exists: true do |t|
        t.bigint :betable_id,   null: false
        t.string :betable_type, null: false
        t.string :betas, array: true, default: [], null: false
        t.timestamps

        t.index [:betable_type, :betable_id], unique: true
      end
    end
  end

  def down
    drop_table :beta_feature_settings if ActiveRecord::Base.connection.data_source_exists? 'beta_feature_settings'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
beta_feature-0.2.1 db/migrate/20210102124824_create_beta_feature_settings.rb
beta_feature-0.2.0 db/migrate/20210102124824_create_beta_feature_settings.rb