Duplicate fields in migration

Posted 1 month ago by jonassiewertsen

I got a site online on production and now i need to change the database structure.

i do have a column named 'date', with a plain dates like '2019-02-20' and a new added column named 'date_time'.

I want to:

  1. Fetch the value from date
  2. Do something with it to make a datetime out of it (we don't need to worry about that)
  3. write it into the the field date_time

What is the best approach to do so in a migration file?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.