2018-11-13 02:27:31 -05:00
|
|
|
class CreateProjectMirrorData < ActiveRecord::Migration[4.2]
|
2018-05-02 09:35:04 -04:00
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def up
|
|
|
|
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
|
|
|
|
|
|
|
|
def down
|
|
|
|
drop_table(:project_mirror_data) if table_exists?(:project_mirror_data)
|
|
|
|
end
|
|
|
|
end
|