db(T0): schema + migration 001 — super_oauth_id, firstname, lastname
tech-lead: overflow granted — gate migration avant Sprint B+C SuperOAuth
This commit is contained in:
12
Backend/database/migrations/001_add_oauth_profile_fields.sql
Normal file
12
Backend/database/migrations/001_add_oauth_profile_fields.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- Migration 001 — Add OAuth + profile fields
|
||||
-- Safe: ADD COLUMN NULL only, no data loss
|
||||
-- Run: mysql -u <user> -p clickerz < migrations/001_add_oauth_profile_fields.sql
|
||||
|
||||
ALTER TABLE users
|
||||
ADD COLUMN IF NOT EXISTS firstname VARCHAR(50) NULL,
|
||||
ADD COLUMN IF NOT EXISTS lastname VARCHAR(50) NULL,
|
||||
ADD COLUMN IF NOT EXISTS super_oauth_id VARCHAR(36) NULL;
|
||||
|
||||
-- Unique index separately (idempotent)
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS uq_users_super_oauth_id
|
||||
ON users (super_oauth_id);
|
||||
Reference in New Issue
Block a user