I am leery of migrating my perfectly stable and fine production data
But I need to add some customer info to my system.
I am adding a new model backed by a database for the new customer
Thus I’m assuming that I won’t need to migrate the old database. The
that there is a new database.
However the existing production database will need a ‘:has_one’ for
This is the change I need to make to the production database of
The new database will hold download links and passwords, for some
orders, So I need the new database (Order_Download) to contain the
above fields (download_link and password) plus the foreign key
order_id, and the old database (Orders)
will contain an ‘:has_one’ to associate it with Order_Download.
So I have:
class Order < ActiveRecord::Base
has_one: order_download // NEW, ADDING TO PRODUCTION DATABASE
class OrderDownload < ActiveRecord::Base // new database
The question is, can I just add this and nothing will break, nothing
migrating, everything is cool?
Or am I changing the production database Orders with a new ‘:has_one’
is going to require me to do something painful? Like migrate, yuck.
Sorry I’m a database newbie and I’d rather not mess with it.