I am pretty sure the console creates suspicious migrations. Here a the reproductible steps:
test with a ts column, selecting Timestamp as the type (and not Time, time without time zone nor timestamp without time zone). Use ts as the PK. You shoud see the following migration now:CREATE TABLE "public"."test"("ts" timestamptz NOT NULL, PRIMARY KEY ("ts") );
ts column, change its GraphQL field name & save. Now you will see the following suspicious migrations:ALTER TABLE "public"."test" ALTER COLUMN "ts" TYPE timestamp with time zone;
ALTER TABLE "public"."test" DROP CONSTRAINT "test_ts_key";
Hope this report will lead to a better product!
@vhiairrassary Is this timestamp with time zone vs timestamptz the problem? if not could you please explain why you think so?
@karthikvt26 I think @vhiairrassary's point is that this migration shouldn't even be generated because only the custom field name of the column is updated?
I agree and atleast with v1.2 and above this should just add an entry in tables.yaml inside metadata.
Ok looks like a way forward is to identify any change to be either metadata only or schema only or both
@karthikvt26 I think @vhiairrassary's point is that this migration shouldn't even be generated because only the custom field name of the column is updated?
Exactly! For information, I am using version 1.2.0-beta.2.
This happens only with the timestamp column. there seems to be an inconsistency while comparing the type of a timestamp column during edit which causes console to believe the type of the column has changed and hence it generates an alter column type query
_edit:_ seems to happen to varchar as well as mentioned in #3345 & #4300
This happens only with the timestamp column. there seems to be an inconsistency while comparing the type of a timestamp column during edit which causes console to believe the type of the column has changed and hence it generates an alter column type query
_edit:_ seems to happen to varchar as well as mentioned in #3345 & #4300
and integer -> int4 #4380
Is there a master references list for the custom types (hasura udt_name) mapped to postgres data_type?