summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-15 11:32:06 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-15 23:50:16 -0200
commitf140ae88c63d0d9976e33eb574702be5e182b851 (patch)
tree65718269b5df9af42f96436921e5bf81839d91a5
parent49a70d1e45b4f841379db059177856671c65159c (diff)
downloadgitlab-ce-f140ae88c63d0d9976e33eb574702be5e182b851.tar.gz
Don't use the Route model in migrations
-rw-r--r--db/migrate/20161130095245_fill_routes_table.rb2
-rw-r--r--db/migrate/20161130101252_fill_projects_routes_table.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20161130095245_fill_routes_table.rb b/db/migrate/20161130095245_fill_routes_table.rb
index 6754e583000..c3536d6d911 100644
--- a/db/migrate/20161130095245_fill_routes_table.rb
+++ b/db/migrate/20161130095245_fill_routes_table.rb
@@ -16,6 +16,6 @@ class FillRoutesTable < ActiveRecord::Migration
end
def down
- Route.delete_all(source_type: 'Namespace')
+ execute("DELETE FROM routes WHERE source_type = 'Namespace'")
end
end
diff --git a/db/migrate/20161130101252_fill_projects_routes_table.rb b/db/migrate/20161130101252_fill_projects_routes_table.rb
index 14700583be5..4f3fe7b03a9 100644
--- a/db/migrate/20161130101252_fill_projects_routes_table.rb
+++ b/db/migrate/20161130101252_fill_projects_routes_table.rb
@@ -17,6 +17,6 @@ class FillProjectsRoutesTable < ActiveRecord::Migration
end
def down
- Route.delete_all(source_type: 'Project')
+ execute("DELETE FROM routes WHERE source_type = 'Project'")
end
end