我有一个用 NextJS 编写的应用程序部署到 Vercel 并在 Heroku 上启动 PostreSQL。
早些时候我使用 MySQL,然后将配置更改为 PostgreSQL。我已使用将表部署到 Heroku PostgreSQLnpx prisma migrate save --schema ./prisma/schema.prisma --experimental
现在,我在做的时候遇到了一个问题npx prisma migrate up --schema ./prisma/schema.prisma --experimental
我得到的错误是:
Changes to be applied:
model TableA {
id Int @default(autoincrement()) @id
...skipped columns...
}
model TableB {
id Int @default(autoincrement()) @id
...skipped columns...
}
Checking the datasource for potential data loss...
Database Changes:
Migration Database actions Status
20201129201149-patchfix-changed-xxxxxx-aaaaaa statements.
20201215212131-add-ttttttt-schema statements.
20201227083423-add-postgresql-database-remote-heroku statements.
20201227090719-add-mysql-heroku-deployed statements.
20210512203825-initial statements.
You can get the detailed db changes with yarn prisma migrate up --experimental --verbose
Or read about them here:
./migrations/20201129201149-patchfix-changed-xxxxxx-aaaaaa/README.md
./migrations/20201215212131-add-ttttttt-schema/README.md
./migrations/20201227083423-add-postgresql-database-remote-heroku/README.md
./migrations/20201227090719-add-mysql-heroku-deployed/README.md
./migrations/20210512203825-initial/README.md
Error: Error querying the database: Error querying the database: db error: ERROR: column "someMaskedColumnName" cannot be cast automatically to type integer
0: sql_migration_connector::sql_database_step_applier::apply_step
with index=0
at migration-engine/connectors/sql-migration-connector/src/sql_database_step_applier.rs:15
1: migration_core::api::ApplyMigration
with migration_id="20201129201149-patchfix-changed-xxxxxx-aaaaaa"
at migration-engine/core/src/api.rs:82
error Command failed with exit code 1.
请帮我解决这个问题,因为很多天我都无法解决这个问题。