diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-01 00:15:40 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-01 00:15:40 +0300 |
commit | eb728d37a7ed940d9d9b1f762c4ea65cc8e35a56 (patch) | |
tree | be6524aa6298385e9bcb93789989bd225b65b043 /db/migrate | |
parent | 161af17c1b69e7e00aefcd4f540a55755259ceda (diff) | |
parent | 3fc4b2c86090841d9a6245b9b73e46231610703e (diff) |
Merge branch 'master' into 'trigger-source'
# Conflicts:
# db/schema.rb
Diffstat (limited to 'db/migrate')
-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 |