Skip to content

Commit

Permalink
chore: change migration
Browse files Browse the repository at this point in the history
Co-authored-by: bjoern-m <[email protected]>
  • Loading branch information
FreddyDevelop and bjoern-m authored Dec 5, 2024
1 parent c4437b7 commit 77b0ad8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ create_table("webauthn_credential_user_handles") {

add_column("webauthn_credentials", "user_handle_id", "uuid", { "null": true })
add_foreign_key("webauthn_credentials", "user_handle_id", {"webauthn_credential_user_handles": ["id"]}, {
"on_delete": "cascade",
"on_delete": "set null",
"on_update": "cascade",
})

sql("ALTER TABLE webauthn_credentials ADD CONSTRAINT webauthn_credential_user_handle_fkey FOREIGN KEY (user_handle_id, user_id) REFERENCES webauthn_credential_user_handles(id, user_id) ON DELETE CASCADE ON UPDATE CASCADE;")
sql("ALTER TABLE webauthn_credentials ADD CONSTRAINT webauthn_credential_user_handle_fkey FOREIGN KEY (user_handle_id, user_id) REFERENCES webauthn_credential_user_handles(id, user_id) ON DELETE NO ACTION ON UPDATE CASCADE;")

0 comments on commit 77b0ad8

Please sign in to comment.