mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-11-01 18:59:13 -05:00
Admins switch features on and off at /admin/features, kept in Flipper. Job ideas (the page, the banners and the overlay) only show while its flag is on. Features are off until switched on. Closes #5050
26 lines
684 B
Ruby
26 lines
684 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Flipper's tables, for the features admins switch on and off.
|
|
class CreateFlipperTables < ActiveRecord::Migration[8.1]
|
|
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, %i(feature_key key value), unique: true, length: { value: 255 }
|
|
end
|
|
|
|
def down
|
|
drop_table :flipper_gates
|
|
drop_table :flipper_features
|
|
end
|
|
end
|