diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-03-14 14:00:21 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-03-14 14:00:21 +0400 |
commit | 0d7986a8c7806a5d7630283f26667f954a5e61f7 (patch) | |
tree | dd99a049f0d1728fcb4a86a95a5f9afca0cf9cc6 /db/migrate | |
parent | 58e4e6b0819fcb385d790671d44c7a5051787e92 (diff) | |
parent | 9064fba071d06439ead76890015c3d38ffa63375 (diff) |
Merge branch 'import-timeout' of https://dev.gitlab.org/dzaporozhets/gitlabhq into dzaporozhets/gitlabhq-import-timeout
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Conflicts:
CHANGELOG
db/schema.rb
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20140312145357_add_import_status_to_project.rb | 5 | ||||
-rw-r--r-- | db/migrate/20140313092127_migrate_already_imported_projects.rb | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20140312145357_add_import_status_to_project.rb b/db/migrate/20140312145357_add_import_status_to_project.rb new file mode 100644 index 00000000000..ef972e8342a --- /dev/null +++ b/db/migrate/20140312145357_add_import_status_to_project.rb @@ -0,0 +1,5 @@ +class AddImportStatusToProject < ActiveRecord::Migration + def change + add_column :projects, :import_status, :string + end +end diff --git a/db/migrate/20140313092127_migrate_already_imported_projects.rb b/db/migrate/20140313092127_migrate_already_imported_projects.rb new file mode 100644 index 00000000000..f4392c0f05e --- /dev/null +++ b/db/migrate/20140313092127_migrate_already_imported_projects.rb @@ -0,0 +1,12 @@ +class MigrateAlreadyImportedProjects < ActiveRecord::Migration + def up + Project.where(imported: true).update_all(import_status: "finished") + Project.where(imported: false).update_all(import_status: "none") + remove_column :projects, :imported + end + + def down + add_column :projects, :imported, :boolean, default: false + Project.where(import_status: 'finished').update_all(imported: true) + end +end |