[openstreetmap/openstreetmap-website] Models in migrations (#2320)
Tom Hughes
notifications at github.com
Wed Jul 17 10:46:07 UTC 2019
tomhughes requested changes on this pull request.
> @@ -1,4 +1,7 @@
class AddUserImageFingerprint < ActiveRecord::Migration[4.2]
+ class User < ActiveRecord::Base
+ end
+
I don't think this will work if there are any users in the database because the migration relies on being able to access the images attached to the user via the paperclip attachment, which has not been declared here.
That of course gets even more fun once we remove paperclip from the Gemfile...
> @@ -1,4 +1,7 @@
class SubscribeOldChangesets < ActiveRecord::Migration[4.2]
+ class Changeset < ActiveRecord::Base
+ end
+
I think this will fail if there are changesets in the database as the migration relies on the `subscribers` and `user` associations on the changeset.
> @@ -1,4 +1,7 @@
class SubscribeAuthorsToDiaryEntries < ActiveRecord::Migration[4.2]
+ class DiaryEntry < ActiveRecord::Base
+ end
+
Again the migration relies on the `subscriptions` and `user` associations.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2320#pullrequestreview-262944656
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190717/e5ca6385/attachment.html>
More information about the rails-dev
mailing list