Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ CREATE TABLE IF NOT EXISTS unique_test_names (
-- Create GIN index on name for LIKE '%pattern%' searches
CREATE INDEX IF NOT EXISTS unique_test_names_trgm_idx ON unique_test_names USING GIN (name gin_trgm_ops);

-- Seed the table with existing test names from tests table
INSERT INTO unique_test_names (name)
SELECT DISTINCT name FROM tests
ON CONFLICT (name) DO NOTHING;

-- Create trigger function to maintain unique_test_names when tests table changes
CREATE OR REPLACE FUNCTION maintain_unique_test_names()
RETURNS TRIGGER AS $$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ CREATE TABLE IF NOT EXISTS unique_test_names (
-- Create index on name for LIKE '%pattern%' searches
CREATE INDEX IF NOT EXISTS unique_test_names_idx ON unique_test_names (name);

-- Seed the table with existing test names from tests table
INSERT OR IGNORE INTO unique_test_names (name)
SELECT DISTINCT name FROM tests;

-- Create trigger function to maintain unique_test_names when tests table changes
-- SQLite uses INSTEAD OF triggers for insert/update/delete, but since we're triggering AFTER,
-- we need separate triggers for each operation.
Expand Down