diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-23 15:26:29 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-23 15:26:29 +0100 |
commit | b92b1e8d9ecfa44cb4bddf63c8bda2348284abe6 (patch) | |
tree | 73ac2dec8aa1c5c7bd7c12801f829c7bc7c39739 /db | |
parent | 29257b0e1c3f30a8aa4f259ff27111d0ab3b833e (diff) | |
download | gitlab-ce-b92b1e8d9ecfa44cb4bddf63c8bda2348284abe6.tar.gz |
Rollback changes made to CreateProjectMirrorData46630-add-missing-columns-to-project-mirror-data
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180502122856_create_project_mirror_data.rb | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/db/migrate/20180502122856_create_project_mirror_data.rb b/db/migrate/20180502122856_create_project_mirror_data.rb index d050ff1ca61..d449f944844 100644 --- a/db/migrate/20180502122856_create_project_mirror_data.rb +++ b/db/migrate/20180502122856_create_project_mirror_data.rb @@ -4,17 +4,13 @@ class CreateProjectMirrorData < ActiveRecord::Migration DOWNTIME = false def up - if table_exists?(:project_mirror_data) - add_column :project_mirror_data, :status, :string unless column_exists?(:project_mirror_data, :status) - add_column :project_mirror_data, :jid, :string unless column_exists?(:project_mirror_data, :jid) - add_column :project_mirror_data, :last_error, :text unless column_exists?(:project_mirror_data, :last_error) - else - create_table :project_mirror_data do |t| - t.references :project, index: true, foreign_key: { on_delete: :cascade } - t.string :status - t.string :jid - t.text :last_error - end + return if table_exists?(:project_mirror_data) + + create_table :project_mirror_data do |t| + t.references :project, index: true, foreign_key: { on_delete: :cascade } + t.string :status + t.string :jid + t.text :last_error end end |