Error: insert or update on table "Post" violates foreign key constraint "Post_authorId_fkey"
0: sql_schema_connector::apply_migration::migration_step
with step=AddForeignKey { foreign_key_id: ForeignKeyId(0) }
at schema-engine/connectors/sql-schema-connector/src/apply_migration.rs:21
1: sql_schema_connector::apply_migration::apply_migration
at schema-engine/connectors/sql-schema-connector/src/apply_migration.rs:10
2: schema_core::state::SchemaPush
at schema-engine/core/src/state.rs:436
This happened after migration on step prior to integrating NextAuth. Up until this point had to update these: react@18, react-dom@18, next@13 to be able to install adapter for next-auth.
When run prisma db push all the tables has been created, however the error keeps showing up.
This happened after migration on step prior to integrating
NextAuth
. Up until this point had to update these:react@18
,react-dom@18
,next@13
to be able to install adapter fornext-auth
.When run
prisma db push
all the tables has been created, however the error keeps showing up.