Sha256: 9c03061cf6a7c62ff2e6467f943235cfadbc0693dad9b2474180167be83c98fa

Contents?: true

Size: 891 Bytes

Versions: 25

Compression:

Stored size: 891 Bytes

Contents

require 'pathname'
require 'logger'

root_path = Pathname(__FILE__).dirname.join('..').expand_path
lib_path  = root_path.join('lib')
$:.unshift(lib_path)

require 'active_record'
ActiveRecord::Base.establish_connection({
  adapter: 'sqlite3',
  database: ':memory:',
})

ActiveRecord::Base.connection.execute <<-SQL
  CREATE TABLE flipper_features (
    id integer PRIMARY KEY,
    key text NOT NULL UNIQUE,
    created_at datetime NOT NULL,
    updated_at datetime NOT NULL
  )
SQL

ActiveRecord::Base.connection.execute <<-SQL
  CREATE TABLE flipper_gates (
    id integer PRIMARY KEY,
    feature_key text NOT NULL,
    key text NOT NULL,
    value text DEFAULT NULL,
    created_at datetime NOT NULL,
    updated_at datetime NOT NULL
  )
SQL

ActiveRecord::Base.connection.execute <<-SQL
  CREATE UNIQUE INDEX index_gates_on_keys_and_value on flipper_gates (feature_key, key, value)
SQL

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
flipper-active_record-0.20.4 examples/active_record/ar_setup.rb
flipper-active_record-0.20.3 examples/active_record/ar_setup.rb
flipper-active_record-0.20.2 examples/active_record/ar_setup.rb
flipper-active_record-0.20.1 examples/active_record/ar_setup.rb
flipper-active_record-0.20.0 examples/active_record/ar_setup.rb
flipper-active_record-0.20.0.beta3 examples/active_record/ar_setup.rb
flipper-active_record-0.20.0.beta2 examples/active_record/ar_setup.rb
flipper-active_record-0.20.0.beta1 examples/active_record/ar_setup.rb
flipper-active_record-0.19.1 examples/active_record/ar_setup.rb
flipper-active_record-0.19.0 examples/active_record/ar_setup.rb
flipper-active_record-0.18.0 examples/active_record/ar_setup.rb
flipper-active_record-0.17.2 examples/active_record/ar_setup.rb
flipper-active_record-0.17.1 examples/active_record/ar_setup.rb
flipper-active_record-0.16.2 examples/active_record/ar_setup.rb
flipper-active_record-0.16.1 examples/active_record/ar_setup.rb
flipper-active_record-0.16.0 examples/active_record/ar_setup.rb
flipper-active_record-0.15.0 examples/active_record/ar_setup.rb
flipper-active_record-0.14.0 examples/active_record/ar_setup.rb
flipper-active_record-0.13.0 examples/active_record/ar_setup.rb
flipper-active_record-0.13.0.beta1 examples/active_record/ar_setup.rb