summaryrefslogtreecommitdiff
path: root/db/post_migrate
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-02-14 12:27:47 -0600
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-02-15 13:31:18 -0600
commit8c1b41f12b5ec8dd3dd2547d3ad729e71c4ebadd (patch)
tree222a746fc2d0a811149389ff74053e4a3fe9e456 /db/post_migrate
parent2fc559142e00cc15a47c49c190666284221cc9b0 (diff)
downloadgitlab-ce-8c1b41f12b5ec8dd3dd2547d3ad729e71c4ebadd.tar.gz
Move migration to post_migrate; fix shortcuts_spec
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20170213172852_remove_theme_id_from_users.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/db/post_migrate/20170213172852_remove_theme_id_from_users.rb b/db/post_migrate/20170213172852_remove_theme_id_from_users.rb
new file mode 100644
index 00000000000..857f678ad0e
--- /dev/null
+++ b/db/post_migrate/20170213172852_remove_theme_id_from_users.rb
@@ -0,0 +1,29 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class RemoveThemeIdFromUsers < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ # Set this constant to true if this migration requires downtime.
+ DOWNTIME = false
+
+ # When a migration requires downtime you **must** uncomment the following
+ # constant and define a short and easy to understand explanation as to why the
+ # migration requires downtime.
+ # DOWNTIME_REASON = ''
+
+ # 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
+ remove_column :users, :theme_id, :integer
+ end
+end