mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 10:11:13 -05:00
10 lines
477 B
SQL
10 lines
477 B
SQL
-- Add submission_item_id to test_data_registry for proper dependency tracking
|
|
ALTER TABLE test_data_registry
|
|
ADD COLUMN IF NOT EXISTS submission_item_id UUID REFERENCES submission_items(id) ON DELETE CASCADE;
|
|
|
|
-- Add index for fast lookups
|
|
CREATE INDEX IF NOT EXISTS idx_test_data_registry_item_id
|
|
ON test_data_registry(submission_item_id);
|
|
|
|
-- Update existing records to have NULL submission_item_id (for backwards compatibility)
|
|
-- New records will populate this field |