diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/fixtures/development/10_merge_requests.rb | 2 | ||||
-rw-r--r-- | db/migrate/20170127032550_remove_backlog_lists_from_boards.rb | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/db/fixtures/development/10_merge_requests.rb b/db/fixtures/development/10_merge_requests.rb index c04afe97277..c304e0706dc 100644 --- a/db/fixtures/development/10_merge_requests.rb +++ b/db/fixtures/development/10_merge_requests.rb @@ -26,7 +26,7 @@ Gitlab::Seeder.quiet do end end - project = Project.find_with_namespace('gitlab-org/gitlab-test') + project = Project.find_by_full_path('gitlab-org/gitlab-test') params = { source_branch: 'feature', diff --git a/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb b/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb new file mode 100644 index 00000000000..0ee4229d1f8 --- /dev/null +++ b/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb @@ -0,0 +1,17 @@ +class RemoveBacklogListsFromBoards < ActiveRecord::Migration + DOWNTIME = false + + def up + execute <<-SQL + DELETE FROM lists WHERE list_type = 0; + SQL + end + + def down + execute <<-SQL + INSERT INTO lists (board_id, list_type, created_at, updated_at) + SELECT boards.id, 0, NOW(), NOW() + FROM boards; + SQL + end +end |