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
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2017-06-01 10:25:48 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2017-06-01 10:25:48 +0300
commit3cc138d824df039af2d7dae2ae04c30e98b51af1 (patch)
treee7b16ba807cad3231b69457bcc71ccbb1b74c4ce /db/migrate
parent17c926313a242c6ad988a7ffd55aa6330c8aacfd (diff)
parentdd0f8b8ccc3b5f61e31703f7391a919b702934a5 (diff)
Merge branch 'master' into '24196-protected-variables'
# Conflicts: # db/schema.rb
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20170524125940_add_source_to_ci_pipeline.rb9
-rw-r--r--db/migrate/20170525174156_create_feature_tables.rb26
2 files changed, 35 insertions, 0 deletions
diff --git a/db/migrate/20170524125940_add_source_to_ci_pipeline.rb b/db/migrate/20170524125940_add_source_to_ci_pipeline.rb
new file mode 100644
index 00000000000..1fa3d48037b
--- /dev/null
+++ b/db/migrate/20170524125940_add_source_to_ci_pipeline.rb
@@ -0,0 +1,9 @@
+class AddSourceToCiPipeline < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :ci_pipelines, :source, :integer
+ end
+end
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