diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-06-01 00:06:01 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-06-01 00:06:01 +0300 |
commit | 671284ba375109becbfa2a288032cdc7301b157b (patch) | |
tree | fc055d19700f433115bbed4f62a86a72c711c56f /db/migrate/20170525174156_create_feature_tables.rb | |
parent | 322c9be816cd5cd9747a8737ec04622aa6b81e6b (diff) |
Add feature toggles through Flipper
Diffstat (limited to 'db/migrate/20170525174156_create_feature_tables.rb')
-rw-r--r-- | db/migrate/20170525174156_create_feature_tables.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/db/migrate/20170525174156_create_feature_tables.rb b/db/migrate/20170525174156_create_feature_tables.rb new file mode 100644 index 00000000000..a083c89c85f --- /dev/null +++ b/db/migrate/20170525174156_create_feature_tables.rb @@ -0,0 +1,26 @@ +class CreateFeatureTables < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def self.up + create_table :features do |t| + t.string :key, null: false + t.timestamps null: false + end + add_index :features, :key, unique: true + + create_table :feature_gates do |t| + t.string :feature_key, null: false + t.string :key, null: false + t.string :value + t.timestamps null: false + end + add_index :feature_gates, [:feature_key, :key, :value], unique: true + end + + def self.down + drop_table :feature_gates + drop_table :features + end +end |