Mysql 5.6: alter column to set default to current_timestamp

kimminpuple

kimminpuple

Posted on November 4, 2019

Mysql 5.6: alter column to set default to current_timestamp

hould be so simple but I'm pulling my hair out trying to figure this out.

This example mimics the migrations I'll run - essentially it's add a new nullable column to the table, set the value to match https://citeref.com/easybib/ https://easytax.onl/irs/ another column, then default it to current_timestamp/not nullable going forward.

DROP TABLE IF EXISTS test https://nitroloan.onl/fedloan/

💖 💪 🙅 🚩
kimminpuple
kimminpuple

Posted on November 4, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related