Right now, the up migrations are not idempotent. This is one such example.
When adding a column, simply add it only if it doesn't exist, otherwise do nothing (= migration has already been run)
Hi!
I'd like to contribute to this issue.
Hi!
PR is ready https://github.com/hasura/graphql-engine/pull/5895
Hi @AdityaAnand1,
Thanks for the report. However, we don't want to make migrations idempotent by default. It's because they become less strict this way.
Let's say someone added a column directly with psql with a different data type. ADD COLUMN IF NOT EXISTS ... migration will succeed, but the Hasura migrations won't reflect the state of the system. You can consider adding IF EXISTS / IF NOT EXISTS manually.
I'm therefore closing this issue.
Thanks @beerose ! Yeah, it's fine, was a good opportunity to get into hasura :)