mirror of
https://github.com/StanGirard/quivr.git
synced 2025-01-08 04:15:17 +03:00
17 lines
538 B
MySQL
17 lines
538 B
MySQL
|
-- 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'
|
||
|
);
|