Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document adding a timestamp column with SQL NOW() as default value #944

Open
notramo opened this issue Jun 21, 2023 · 1 comment
Open

Document adding a timestamp column with SQL NOW() as default value #944

notramo opened this issue Jun 21, 2023 · 1 comment
Labels
documentation This just needs more/better documentation

Comments

@notramo
Copy link

notramo commented Jun 21, 2023

Is it possible to add a timestamp typed column to an existing table, with the default value being a raw SQL NOW()? So if a new record is added, the column value is set to the timestamp the column was added.

@jwoertink
Copy link
Member

Yup. add time : Time, default: :now. Looks like it's just not documented.

@notramo notramo changed the title Adding timestamp to existing table with NOW() as default value Document adding a timestamp column with SQL NOW() as default value Jun 23, 2023
@jwoertink jwoertink added the documentation This just needs more/better documentation label Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This just needs more/better documentation
Projects
None yet
Development

No branches or pull requests

2 participants