hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.15k stars 2.76k forks source link

hasura migrate create --from-server loses manual SQL migrations which breaks enum tables #4222

Open maxcan opened 4 years ago

maxcan commented 4 years ago

If you use that approach to squash migrations, you lose any manual INSERT INTO SQL migrations that you've run.

The main problem with this is that if you have any enum tables, they new migrations will break since enum tables must have at least one row.

At a minimum, this should be noted in the docs (happy to put in some copy if you want) but ideally the --from-server option should have an option to include manual SQL insertion migrations or a big flashing warning when you try to run it on a DB with enum tables.

This is on GQL Engine 1.1 but has been an issue since enum tables were released.

shahidhk commented 4 years ago

@maxcan We're aware of the issue and some discussions are going on at https://github.com/hasura/graphql-engine/issues/2817

Closing this issue in favour of the other one.

tirumaraiselvan commented 4 years ago

2817 is closed with a console side solution. Hence, reopening this for the cli side issue.

maxcan commented 4 years ago

@tirumaraiselvan thanks for the update. looking forward to 1.4!

seanonthenet commented 3 years ago

Is this fixed in 2.0.0 ?

seanonthenet commented 3 years ago

Please can this be added to 2.0.0 milestone. Still not supported. 🙏