DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

kimminpuple
kimminpuple

Posted on

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/

Top comments (0)

We are hiring! Do you want to be our Senior Platform Engineer? Are you capable of chipping in across sysadmin, ops, and site reliability work, while supporting the open source stack that runs DEV and other communities?

This role might just be for you!

Apply now