File tree Expand file tree Collapse file tree 2 files changed +0
-9
lines changed
postgres/migrations/2025-11-19-000000_unique_test_names
sqlite/migrations/2025-11-19-000000_unique_test_names Expand file tree Collapse file tree 2 files changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,6 @@ CREATE TABLE IF NOT EXISTS unique_test_names (
66-- Create GIN index on name for LIKE '%pattern%' searches
77CREATE INDEX IF NOT EXISTS unique_test_names_trgm_idx ON unique_test_names USING GIN (name gin_trgm_ops);
88
9- -- Seed the table with existing test names from tests table
10- INSERT INTO unique_test_names (name)
11- SELECT DISTINCT name FROM tests
12- ON CONFLICT (name) DO NOTHING;
13-
149-- Create trigger function to maintain unique_test_names when tests table changes
1510CREATE OR REPLACE FUNCTION maintain_unique_test_names ()
1611RETURNS TRIGGER AS $$
Original file line number Diff line number Diff line change @@ -6,10 +6,6 @@ CREATE TABLE IF NOT EXISTS unique_test_names (
66-- Create index on name for LIKE '%pattern%' searches
77CREATE INDEX IF NOT EXISTS unique_test_names_idx ON unique_test_names (name);
88
9- -- Seed the table with existing test names from tests table
10- INSERT OR IGNORE INTO unique_test_names (name)
11- SELECT DISTINCT name FROM tests;
12-
139-- Create trigger function to maintain unique_test_names when tests table changes
1410-- SQLite uses INSTEAD OF triggers for insert/update/delete, but since we're triggering AFTER,
1511-- we need separate triggers for each operation.
You can’t perform that action at this time.
0 commit comments