13 lines
326 B
MySQL
13 lines
326 B
MySQL
|
|
-- Add country column to User table
|
||
|
|
-- This is used for mentor matching and geographic filtering
|
||
|
|
|
||
|
|
DO $$
|
||
|
|
BEGIN
|
||
|
|
IF NOT EXISTS (
|
||
|
|
SELECT 1 FROM information_schema.columns
|
||
|
|
WHERE table_name = 'User' AND column_name = 'country'
|
||
|
|
) THEN
|
||
|
|
ALTER TABLE "User" ADD COLUMN "country" TEXT;
|
||
|
|
END IF;
|
||
|
|
END $$;
|