You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, thanks for the great tool. I know that DB migrations and how to handle them are an extremely divisive topic, but Atlas serves my needs perfectly (and without dragging JRE😬 along with it).
I have a small suggestion though for improving the documentation on column default values in HCL schema definitions, specifically when they're not a literal value, but come from a builtin or extensions function. Was floundering on this for quite a while until I finally realized I could do a reverse-lookup by creating a table with the desired column definition and then inspect the schema with atlas itself to get to the HCL equivalent. In the end, something like:
CREATE TABLE t (
id INT
ts TIMESTAMPTZ DEFAULT NOW()
);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First off, thanks for the great tool. I know that DB migrations and how to handle them are an extremely divisive topic, but Atlas serves my needs perfectly (and without dragging JRE😬 along with it).
I have a small suggestion though for improving the documentation on column default values in HCL schema definitions, specifically when they're not a literal value, but come from a builtin or extensions function. Was floundering on this for quite a while until I finally realized I could do a reverse-lookup by creating a table with the desired column definition and then inspect the schema with
atlas
itself to get to the HCL equivalent. In the end, something like:is reported in HCL as:
Hah!
But I guess this could be made a bit easier to find out for others? 😉
Beta Was this translation helpful? Give feedback.
All reactions