Closed wibed closed 11 months ago
i update the field as follows:
try await database.schema(Contract.schema) .foreignKey("author_id", references: Account.schema, "id", onDelete: .cascade) .update()
the sql command is wrong though
ALTER TABLE "contract" ADD CONSTRAINT "fk:contract.author_id+contract.id" FOREIGN KEY ("author_id") REFERENCES "contract" ("id") ON DELETE CASCADE ON UPDATE NO ACTION
it does return correctly on:
try await database.schema(Contract.schema) .foreignKey("author_id", references: Account.schema, .id, onDelete: .cascade) .update()
execute <unnamed>: ALTER TABLE "contract" ADD CONSTRAINT "fk:contract.author_id+contract.id" FOREIGN KEY ("author_id") REFERENCES "account" ("id") ON DELETE CASCADE ON UPDATE NO ACTION
even though the wrong sql query is sent the foreign keys table shows it to be correct though link to image
nope must have mistaken one of the queries for the other
i update the field as follows:
the sql command is wrong though
it does return correctly on: