Commit b92b1e8d authored by Tiago Botelho's avatar Tiago Botelho

Rollback changes made to CreateProjectMirrorData

parent 29257b0e
...@@ -4,11 +4,8 @@ class CreateProjectMirrorData < ActiveRecord::Migration ...@@ -4,11 +4,8 @@ class CreateProjectMirrorData < ActiveRecord::Migration
DOWNTIME = false DOWNTIME = false
def up def up
if table_exists?(:project_mirror_data) return 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| create_table :project_mirror_data do |t|
t.references :project, index: true, foreign_key: { on_delete: :cascade } t.references :project, index: true, foreign_key: { on_delete: :cascade }
t.string :status t.string :status
...@@ -16,7 +13,6 @@ class CreateProjectMirrorData < ActiveRecord::Migration ...@@ -16,7 +13,6 @@ class CreateProjectMirrorData < ActiveRecord::Migration
t.text :last_error t.text :last_error
end end
end end
end
def down def down
drop_table(:project_mirror_data) if table_exists?(:project_mirror_data) drop_table(:project_mirror_data) if table_exists?(:project_mirror_data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment