This commit is contained in:
parent
6bbfc671b3
commit
2e376269c2
28 changed files with 389 additions and 332 deletions
|
|
@ -79,6 +79,20 @@ BEGIN
|
|||
END IF;
|
||||
END $$;
|
||||
|
||||
-- Add display_name column if it doesn't exist (for existing databases)
|
||||
-- display_name stores the user's preferred casing, name stores lowercase URL slug
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT 1 FROM information_schema.columns
|
||||
WHERE table_name = 'realms' AND column_name = 'display_name'
|
||||
) THEN
|
||||
ALTER TABLE realms ADD COLUMN display_name VARCHAR(255);
|
||||
-- Populate display_name from name for existing realms
|
||||
UPDATE realms SET display_name = name WHERE display_name IS NULL;
|
||||
END IF;
|
||||
END $$;
|
||||
|
||||
-- Make stream_key nullable for video realms (for existing databases)
|
||||
DO $$
|
||||
BEGIN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue