mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 17:45:53 +01:00
test(db): order grant rollback dependencies
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
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"`;
|
||||
|
||||
Reference in new issue
Block a user