Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-06-01 00:06:03 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-06-01 00:06:03 +0300
commit3fc4b2c86090841d9a6245b9b73e46231610703e (patch)
treefc055d19700f433115bbed4f62a86a72c711c56f /db
parent322c9be816cd5cd9747a8737ec04622aa6b81e6b (diff)
parent671284ba375109becbfa2a288032cdc7301b157b (diff)
Merge branch 'feature-flags-flipper' into 'master'
Add feature toggles through Flipper See merge request !11747
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170525174156_create_feature_tables.rb26
-rw-r--r--db/schema.rb20
2 files changed, 45 insertions, 1 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
diff --git a/db/schema.rb b/db/schema.rb
index 4c73f74ef1f..d0021a566c8 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20170523091700) do
+ActiveRecord::Schema.define(version: 20170525174156) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -440,6 +440,24 @@ ActiveRecord::Schema.define(version: 20170523091700) do
add_index "events", ["target_id"], name: "index_events_on_target_id", using: :btree
add_index "events", ["target_type"], name: "index_events_on_target_type", using: :btree
+ create_table "feature_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
+ end
+
+ add_index "feature_gates", ["feature_key", "key", "value"], name: "index_feature_gates_on_feature_key_and_key_and_value", unique: true, using: :btree
+
+ create_table "features", force: :cascade do |t|
+ t.string "key", null: false
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ end
+
+ add_index "features", ["key"], name: "index_features_on_key", unique: true, using: :btree
+
create_table "forked_project_links", force: :cascade do |t|
t.integer "forked_to_project_id", null: false
t.integer "forked_from_project_id", null: false