]> git.openstreetmap.org Git - rails.git/commit
Avoid using live models in old migrations
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 17 Jul 2019 09:52:02 +0000 (11:52 +0200)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 17 Jul 2019 09:52:02 +0000 (11:52 +0200)
commit6ebb21b66020ba845abd9fda408bb204d326e0de
treed604d0b8936fff670cd68314a48712c9b28fbf8e
parent40ac2aa5280f46c0c8cf3676596334269ec2f696
Avoid using live models in old migrations

Instead, we define models in the migrations themselves. This ensures that
column names etc match the state of the database during the migration,
not the current live version of the model.
db/migrate/044_create_user_roles.rb
db/migrate/20120219161649_add_user_image_fingerprint.rb
db/migrate/20180204153242_tile_users.rb