Generate down migration for "updated_at" column template #8018
Labels
c/console
Related to console
estimate/M
k/enhancement
New feature or improve an existing feature
p/longterm
Low priority issues that will be picked up based on user feedback or bandwidth
Is your proposal related to a problem?
The "frequently used columns" wizard when modifying a table is very helpful, but the "updated_at" template does not generate a down migration. Migrations really need to be able to be applied up and down, so not doing that creates a bad situation.
Describe the solution you'd like
Since the Hasura console is the one generating the code to add the column, set up a function, and creating a trigger to call that function, it should know enough on how to undo that work. It's currently being pushed to the end user, who didn't create the DDL for "up" migration, making the user a poor choice for implementing the "down" migration correctly.
Describe alternatives you've considered
I have to manually supply down migrations wherever I've used that "updated_at" template.
If the feature is approved, would you be willing to submit a PR?
Yes.
The text was updated successfully, but these errors were encountered: