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:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-02-13 20:38:53 +0300
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-02-15 22:31:18 +0300
commit0667d1aa7f251f5bf11dd121fe2f696107d8103e (patch)
tree0e75cc8b30001490abd3c22be7ae0efabb971ddb /db
parentb0dff3c83edcc2b48a0457ad93da4e8d4324ed06 (diff)
Drop theme ID from users table
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170213172852_remove_theme_id_from_users.rb29
-rw-r--r--db/schema.rb7
2 files changed, 32 insertions, 4 deletions
diff --git a/db/migrate/20170213172852_remove_theme_id_from_users.rb b/db/migrate/20170213172852_remove_theme_id_from_users.rb
new file mode 100644
index 00000000000..857f678ad0e
--- /dev/null
+++ b/db/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
diff --git a/db/schema.rb b/db/schema.rb
index 52672406ec6..df065520835 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: 20170214111112) do
+ActiveRecord::Schema.define(version: 20170213172852) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -109,8 +109,8 @@ ActiveRecord::Schema.define(version: 20170214111112) do
t.boolean "html_emails_enabled", default: true
t.string "plantuml_url"
t.boolean "plantuml_enabled"
- t.integer "max_pages_size", default: 100, null: false
t.integer "terminal_max_session_time", default: 0, null: false
+ t.integer "max_pages_size", default: 100, null: false
end
create_table "audit_events", force: :cascade do |t|
@@ -1238,7 +1238,6 @@ ActiveRecord::Schema.define(version: 20170214111112) do
t.string "linkedin", default: "", null: false
t.string "twitter", default: "", null: false
t.string "authentication_token"
- t.integer "theme_id", default: 1, null: false
t.string "bio"
t.integer "failed_attempts", default: 0
t.datetime "locked_at"
@@ -1351,4 +1350,4 @@ ActiveRecord::Schema.define(version: 20170214111112) do
add_foreign_key "timelogs", "merge_requests", name: "fk_timelogs_merge_requests_merge_request_id", on_delete: :cascade
add_foreign_key "trending_projects", "projects", on_delete: :cascade
add_foreign_key "u2f_registrations", "users"
-end \ No newline at end of file
+end