mirror of
https://github.com/DeNNiiInc/Web-Page-Performance-Test.git
synced 2026-04-17 11:55:59 +00:00
Add fix_schema.sql to ensure DB columns exist
This commit is contained in:
11
migrations/fix_schema.sql
Normal file
11
migrations/fix_schema.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- Ensure all columns exist
|
||||
ALTER TABLE test_results ADD COLUMN IF NOT EXISTS user_ip TEXT;
|
||||
ALTER TABLE test_results ADD COLUMN IF NOT EXISTS filmstrip JSONB;
|
||||
ALTER TABLE test_results ADD COLUMN IF NOT EXISTS user_uuid TEXT;
|
||||
ALTER TABLE test_results ADD COLUMN IF NOT EXISTS scores JSONB;
|
||||
ALTER TABLE test_results ADD COLUMN IF NOT EXISTS metrics JSONB;
|
||||
|
||||
-- Ensure unused columns are nullable (or drop them if you prefer, but let's just ensure they don't block inserts)
|
||||
ALTER TABLE test_results ALTER COLUMN suite_id DROP NOT NULL;
|
||||
ALTER TABLE test_results ALTER COLUMN run_number DROP NOT NULL;
|
||||
ALTER TABLE test_results ALTER COLUMN is_median DROP NOT NULL;
|
||||
Reference in New Issue
Block a user