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

Generate down migration for "updated_at" column template #8018

Open
nirvdrum opened this issue Jan 12, 2022 · 1 comment
Open

Generate down migration for "updated_at" column template #8018

nirvdrum opened this issue Jan 12, 2022 · 1 comment
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

Comments

@nirvdrum
Copy link
Contributor

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.

@nirvdrum nirvdrum added the k/enhancement New feature or improve an existing feature label Jan 12, 2022
@rikinsk rikinsk added the c/console Related to console label Jan 13, 2022
@rikinsk
Copy link
Member

rikinsk commented Mar 7, 2022

@nirvdrum hey, this is definitely something to add. Would you be willing to raise a PR for this? we could guide you with the same if yes.

@vijayprasanna13 vijayprasanna13 added p/longterm Low priority issues that will be picked up based on user feedback or bandwidth estimate/M labels Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants