Graphql-engine: Feature request: Ability to flag insert as a migration

Created on 13 Mar 2019  路  6Comments  路  Source: hasura/graphql-engine

Currently under "Raw SQL" there is an option to flag a SQL statement (including inserts) as a migration so the migration files are automatically created.

This is very helpful but I think being able to flag a new record to be inserted as a migration using the web based CLI would be even more helpful.

The UI could look something like this:

This is a migration

console easy enhancement high wip

All 6 comments

Seconded, would have come in handy today)

I think having the ability to flag a migration when editing a record using the console would be a really helpful feature to have as well. It would make loading "fixtures" or initial data very simple.

I would find it very useful as well!

I would also find this useful. Especially since ENUMs are not yet supported, if you use a foreign table contents as "type" in another table, the rows in the foreign table essentially become part of your schema due to the constraints between the two. So those inserts to the foreign table belong to migrations, and it would be nice to be able to flag them as such.

This feature is blocked on https://github.com/hasura/graphql-engine/issues/3082

This is because, the complete row details (including auto generated values) are required to generate down migrations. Once the CLI supports generating migrations without executing them, the console can first insert the value, get the row details and then create up and down migrations.

@shahidhk @arvi3411301 @scriptonist can y'all get #3082 done ASAP so that we can start fixing this issue? It's been open for a while and a lot of people seem to want it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marionschleifer picture marionschleifer  路  3Comments

lishine picture lishine  路  3Comments

EmrysMyrddin picture EmrysMyrddin  路  3Comments

macalinao picture macalinao  路  3Comments

stereobooster picture stereobooster  路  3Comments