Skip to content

Default column values #3288

Closed Answered by georgesittas
esciara asked this question in Q&A
Discussion options

You must be logged in to vote

A bit late to reply here, but perhaps an ALTER TABLE @this_model ALTER COLUMN ... SET DEFAULT ... post-statement does the trick. Make sure to run that only during table creation time:

@IF(
  @runtime_stage = 'creating',
  ALTER TABLE ...
);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by georgesittas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants