Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-15 16:32:06 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-16 04:50:16 +0300
commitf140ae88c63d0d9976e33eb574702be5e182b851 (patch)
tree65718269b5df9af42f96436921e5bf81839d91a5 /db
parent49a70d1e45b4f841379db059177856671c65159c (diff)
Don't use the Route model in migrations
Diffstat (limited to 'db')
-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