Sha256: eb9512e465d3f14ceab76f6db69d43befb0def2b4d1699075b5857901fcf0a8f

Contents?: true

Size: 612 Bytes

Versions: 8

Compression:

Stored size: 612 Bytes

Contents

class CreateFlipperTables < ActiveRecord::Migration<%= migration_version %>
  def up
    create_table :flipper_features do |t|
      t.string :key, null: false
      t.timestamps null: false
    end
    add_index :flipper_features, :key, unique: true

    create_table :flipper_gates do |t|
      t.string :feature_key, null: false
      t.string :key, null: false
      t.text :value
      t.timestamps null: false
    end
    add_index :flipper_gates, [:feature_key, :key, :value], unique: true, length: { value: 255 }
  end

  def down
    drop_table :flipper_gates
    drop_table :flipper_features
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
flipper-active_record-1.3.2 lib/generators/flipper/templates/migration.erb
flipper-active_record-1.3.1 lib/generators/flipper/templates/migration.erb
flipper-active_record-1.3.0 lib/generators/flipper/templates/migration.erb
flipper-active_record-1.3.0.pre lib/generators/flipper/templates/migration.erb
flipper-active_record-1.2.2 lib/generators/flipper/templates/migration.erb
flipper-active_record-1.2.1 lib/generators/flipper/templates/migration.erb
flipper-active_record-1.2.0 lib/generators/flipper/templates/migration.erb
flipper-active_record-1.1.2 lib/generators/flipper/templates/migration.erb