veylant/migrations/000010_local_auth.up.sql
2026-03-06 18:38:04 +01:00

11 lines
452 B
SQL

-- Migration 000010: Local email/password authentication
-- Adds password_hash column to users table (replaces Keycloak external_id auth).
-- Seeds dev users with bcrypt hashes.
ALTER TABLE users ADD COLUMN IF NOT EXISTS password_hash TEXT NOT NULL DEFAULT '';
-- Update seed dev admin user with bcrypt("admin123")
UPDATE users
SET password_hash = '$2a$10$P6IygH9MpDmKrrACsnYeCeAsTEgVUrFWbHksa4KS7FHSCBcExDYXy'
WHERE email = 'admin@veylant.dev';