这是indexloc提供的服务,不要输入任何密码
Skip to content

console: suspicious migrations created after column edition #4215

@vhiairrassary

Description

@vhiairrassary

I am pretty sure the console creates suspicious migrations. Here a the reproductible steps:

  • Start with a fresh Hasura instance & a fresh database as well;
  • Set up a project directory & Open the console from the CLI (as show in the documentation);
  • Create a table 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") );
  • Edit the 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!

Metadata

Metadata

Assignees

Labels

c/consoleRelated to consolec/migrationsRelated to migrationse/easycan be wrapped up in a couple of daysk/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions