Open anonymouz4 opened 1 year ago
Currently it isn't possible to declare a constraint, while making it DEFERRABLE or set a initial deferred state.
Workaround 1:
guard let db = database as? PostgresDatabase else { throw Abort(.internalServerError) } try db.simpleQuery("ALTER TABLE waitlist ADD CONSTRAINT no_duplicate_ranks UNIQUE(waitlist_rank) DEFERRABLE;").wait()
Workaround 2:
// In create migration .constraint(.custom("CONSTRAINT \"no_duplicate_ranks\" UNIQUE(waitlist_rank) DEFERRABLE"))
Currently it isn't possible to declare a constraint, while making it DEFERRABLE or set a initial deferred state.
Workaround 1:
Workaround 2: