Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/lib/db/rls-migrations.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { describe, expect, it } from 'vitest';

describe('RLS migrations', () => {
it('keeps the failed_webhook_events RLS migration statement intact', () => {
const migration = readFileSync(
join(process.cwd(), 'supabase/migrations/0013_failed_webhook_events_rls.sql'),
'utf8',
);

expect(migration.toLowerCase()).toMatch(
/alter table(?: if exists)? failed_webhook_events enable row level security/,
);
});
});
1 change: 1 addition & 0 deletions supabase/migrations/0013_failed_webhook_events_rls.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE IF EXISTS failed_webhook_events ENABLE ROW LEVEL SECURITY;
Loading