-- Add Firebase UID mapping for hybrid auth.

ALTER TABLE users
  ADD COLUMN firebase_uid VARCHAR(128) NULL AFTER id,
  ADD COLUMN auth_provider VARCHAR(16) NOT NULL DEFAULT 'local' AFTER firebase_uid;

CREATE UNIQUE INDEX uq_users_firebase_uid ON users(firebase_uid);
