mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-27 13:22:44 +03:00
16cea2c86b
https://github.com/StanGirard/quivr/issues/1338 <img width="1215" alt="Screenshot 2023-10-05 at 18 05 30" src="https://github.com/StanGirard/quivr/assets/63923024/67562c50-ddc1-4eaa-8b68-d374b2eb4b67">
17 lines
538 B
SQL
17 lines
538 B
SQL
-- Check if onboarding_a column exists
|
|
DO $$
|
|
BEGIN
|
|
IF NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_name = 'onboardings' AND column_name = 'onboarding_a') THEN
|
|
ALTER TABLE onboardings ADD COLUMN onboarding_a BOOLEAN NOT NULL DEFAULT true;
|
|
END IF;
|
|
END $$;
|
|
|
|
COMMIT;
|
|
|
|
|
|
-- Update migrations table
|
|
INSERT INTO migrations (name)
|
|
SELECT '20231005170000_add_onboarding_a_to_onboarding_table'
|
|
WHERE NOT EXISTS (
|
|
SELECT 1 FROM migrations WHERE name = '20231005170000_add_onboarding_a_to_onboarding_table'
|
|
); |