Migrate to flipper
This commit is contained in:
parent
28d869e818
commit
65e227c44b
33 changed files with 186 additions and 181 deletions
22
db/migrate/20190704094454_create_flipper_tables.rb
Normal file
22
db/migrate/20190704094454_create_flipper_tables.rb
Normal file
|
@ -0,0 +1,22 @@
|
|||
class CreateFlipperTables < ActiveRecord::Migration[5.2]
|
||||
def self.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.string :value
|
||||
t.timestamps null: false
|
||||
end
|
||||
add_index :flipper_gates, [:feature_key, :key, :value], unique: true
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :flipper_gates
|
||||
drop_table :flipper_features
|
||||
end
|
||||
end
|
18
db/schema.rb
18
db/schema.rb
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2019_08_22_143413) do
|
||||
ActiveRecord::Schema.define(version: 2019_08_28_073736) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -355,6 +355,22 @@ ActiveRecord::Schema.define(version: 2019_08_22_143413) do
|
|||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "flipper_features", force: :cascade do |t|
|
||||
t.string "key", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["key"], name: "index_flipper_features_on_key", unique: true
|
||||
end
|
||||
|
||||
create_table "flipper_gates", force: :cascade do |t|
|
||||
t.string "feature_key", null: false
|
||||
t.string "key", null: false
|
||||
t.string "value"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["feature_key", "key", "value"], name: "index_flipper_gates_on_feature_key_and_key_and_value", unique: true
|
||||
end
|
||||
|
||||
create_table "follows", id: :serial, force: :cascade do |t|
|
||||
t.integer "instructeur_id", null: false
|
||||
t.integer "dossier_id", null: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue