test(db): order grant rollback dependencies

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-08-20 21:51:57 +00:00
1 parent 756dd2fbde
commit fda25be6b1
1 file changed
+2
@@ -25,6 +25,7 @@ describeEmbeddedPostgres("connections v3 schema core migration", () => {
cleanups.push(async () => sql.end());
await sql`DELETE FROM "drizzle"."__drizzle_migrations" WHERE "hash" = ${await migrationHash()}`;
await sql`DROP TABLE IF EXISTS "connection_grant_members"`;
await sql`DROP TABLE IF EXISTS "connection_grants"`;
await sql`DROP INDEX IF EXISTS "tool_connections_company_uid_uq"`;
await sql`ALTER TABLE "tool_connections" DROP CONSTRAINT IF EXISTS "tool_connections_company_id_uq"`;
@@ -71,6 +72,7 @@ describeEmbeddedPostgres("connections v3 schema core migration", () => {
VALUES (${companyId}, ${connectionId}, 'user', 'user-1', true)
`).rejects.toMatchObject({ code: "23514" });
await sql`DROP TABLE IF EXISTS "connection_grant_members"`;
await sql`DROP TABLE "connection_grants"`;
await sql`DROP INDEX "tool_connections_company_uid_uq"`;
await sql`ALTER TABLE "tool_connections" DROP CONSTRAINT "tool_connections_company_id_uq"`;