Commit graph

3 commits

Author SHA1 Message Date
Stan Hu
a52cbf6b00 Fix migration failure when groups are missing route
When a Group is missing a route, the migration failed previously with a
`Invalid single-table inheritance type` error. To fix this, we can
disable STI for the migration class because we don't need to know about
the type to do this migration. Besides, currently Group is the only type
used in the type column.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58714
2019-06-01 23:06:46 -07:00
Jan Provaznik
0fc9f9d3e7 Add version 4.2 to all existing migrations
DB schema generated by a migration may look different in
rails 4 and 5 (because rails 5 may use different default values).
For this reason it's important to explicitly set for which rails
version a migration was written for.

See https://stackoverflow.com/questions/35929869/activerecordmigration-deprecation-warning-asks-for-rails-version-but-im-no/35930912#35930912
2018-11-22 13:18:28 +01:00
Yorick Peterse
7a233b37cd
Remove code for dynamically generating routes
This adds a database migration that creates routes for any projects and
namespaces that don't already have one. We also remove the runtime code
for dynamically creating routes, as this is no longer necessary.
2018-07-25 16:41:29 +02:00