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:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-07-16 21:10:22 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-07-16 21:25:30 +0300
commit9912ad261f696ef92657171396774607af7f1893 (patch)
tree9268e628db419c2c88b5bb64a6ce478b6bfe3163 /db
parent50abec8ca36c5cbdb1f7878b3ac956211fc67d3d (diff)
Store when and yaml variables in builds table
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb22
-rw-r--r--db/schema.rb4
2 files changed, 25 insertions, 1 deletions
diff --git a/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb b/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb
new file mode 100644
index 00000000000..816a32aa0d3
--- /dev/null
+++ b/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb
@@ -0,0 +1,22 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddWhenAndYamlVariablesCiBuilds < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ # When using the methods "add_concurrent_index" or "add_column_with_default"
+ # you must disable the use of transactions as these methods can not run in an
+ # existing transaction. When using "add_concurrent_index" make sure that this
+ # method is the _only_ method called in the migration, any other changes
+ # should go in a separate migration. This ensures that upon failure _only_ the
+ # index creation fails and can be retried or reverted easily.
+ #
+ # To disable transactions uncomment the following line and remove these
+ # comments:
+ # disable_ddl_transaction!
+
+ def change
+ add_column :ci_builds, :when, :string
+ add_column :ci_builds, :yaml_variables, :text
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index f24e47b85b2..4a0df65aafb 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: 20160712171823) do
+ActiveRecord::Schema.define(version: 20160716115710) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -168,6 +168,8 @@ ActiveRecord::Schema.define(version: 20160712171823) do
t.datetime "artifacts_expire_at"
t.string "environment"
t.integer "artifacts_size"
+ t.string "when"
+ t.text "yaml_variables"
end
add_index "ci_builds", ["commit_id", "stage_idx", "created_at"], name: "index_ci_builds_on_commit_id_and_stage_idx_and_created_at", using: :btree