Open otan opened 2 years ago
(cockroachdb/prisma issue) Prisma drops a PRIMARY KEY and sets another set of fields as PK on PG. This setup needs to use ALTER PRIMARY KEY in CockroachDB.
We support this syntax within a transaction.
We support this syntax within a transaction.
guess prisma doesn't do it within a txn then, hehe! (haven't looked deep enough to know, but they recalled it being a problem and i see some error messages related to it)
edit: looks like they drop PKs, do schema changes, then sometimes readd it
This issue captures known issues with using
prisma migrate
by running the test suite.cargo test -p migration-engine-tests 2>&1 | tee ~/prisma-migrate-log
): https://gist.github.com/otan/2158e17ab21596968553c6ae15550a40Blocking issues:
is_cockroach
check does not work here: https://github.com/prisma/prisma-engines/blob/a72b5e6e3c931bab4f2c2f3e04e4ac893c79e132/libs/sql-schema-describer/src/postgres.rs#L156CREATE EXTENSION uuid-ossp
: https://github.com/prisma/prisma-engines/commit/8e5838c0c35ff98430462bf711503e629b15541bSomewhat ignorable issues (we can probably skip these tests if we don't think they matter)
ERROR: column "field" being dropped, try again later
related errors applying prisma schema changes. investigate and separate txn on prisma side if possible.ALTER COLUMN TYPE cannot be used in combination with other ALTER TABLE commands
unimplemented: ALTER COLUMN TYPE is not supported inside a transaction
ALTER COLUMN TYPE requiring rewrite of on-disk data is currently not supported for columns that are part of an index
Ignorable issues (probably will skip tests):
ERROR: unimplemented: extension "citext" is not yet supported
(citext_to_text_and_back_works)Epic CRDB-12077
Jira issue: CRDB-11438