summaryrefslogtreecommitdiff
path: root/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-07-16 20:10:22 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-07-16 20:25:30 +0200
commit9912ad261f696ef92657171396774607af7f1893 (patch)
tree9268e628db419c2c88b5bb64a6ce478b6bfe3163 /db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb
parent50abec8ca36c5cbdb1f7878b3ac956211fc67d3d (diff)
downloadgitlab-ce-9912ad261f696ef92657171396774607af7f1893.tar.gz
Store when and yaml variables in builds table
Diffstat (limited to 'db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb')
-rw-r--r--db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb22
1 files changed, 22 insertions, 0 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