You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Another day, another issue馃槄...
When I try to insert the sql queries into the planetscale db, I get the following error: VT10001: foreign key constraints are not allowed
Query: ALTER TABLE accountsADD CONSTRAINTaccounts_userId_fkey FOREIGN KEY (userId) REFERENCES users(id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE sessions ADD CONSTRAINT sessions_userId_fkey FOREIGN KEY (userId) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE posts ADD CONSTRAINT posts_authorId_fkey FOREIGN KEY (authorId) REFERENCES users(id) ON DELETE RESTRICT ON UPDATE CASCADE;`
The text was updated successfully, but these errors were encountered:
Hello,
Another day, another issue馃槄...
When I try to insert the sql queries into the planetscale db, I get the following error:
VT10001: foreign key constraints are not allowed
Query:
ALTER TABLE
accountsADD CONSTRAINT
accounts_userId_fkeyFOREIGN KEY (
userId) REFERENCES
users(
id`) ON DELETE CASCADE ON UPDATE CASCADE;ALTER TABLE
sessions
ADD CONSTRAINTsessions_userId_fkey
FOREIGN KEY (userId
) REFERENCESusers
(id
) ON DELETE CASCADE ON UPDATE CASCADE;ALTER TABLE
posts
ADD CONSTRAINTposts_authorId_fkey
FOREIGN KEY (authorId
) REFERENCESusers
(id
) ON DELETE RESTRICT ON UPDATE CASCADE;`The text was updated successfully, but these errors were encountered: