Files
baiyue-firstleg/auth/src/main/resources/db/phase1-admin-accounts.sql
T
2026-08-26 11:10:42 +08:00

26 lines
1.1 KiB
SQL

-- Phase-one local platform administrator account. Merchant accounts are created through onboarding.
-- Development-only initial password: ChangeMe123!
-- The BCrypt hash is intentionally stored instead of plaintext.
USE baiyue_auth;
SET NAMES utf8mb4;
INSERT INTO auth_account (
id, username, password_hash, display_name, account_status,
failed_login_count, token_version, password_change_required, default_tenant_id,
operator_tenant_id, default_membership_id, default_app_code, deleted
) VALUES
(1000001, 'platform_admin', '$2a$12$AMZJjd88leYPLI9uKvjZiew2CTQXI32BXoHFX.FrCi28/IeZ7mZ96',
'平台系统管理员', 'ACTIVE', 0, 1, 0, 0, 0, 3000001, 'PLATFORM', 0)
ON DUPLICATE KEY UPDATE
password_hash = VALUES(password_hash),
display_name = VALUES(display_name),
account_status = 'ACTIVE',
failed_login_count = 0,
locked_until = NULL,
password_change_required = VALUES(password_change_required),
default_tenant_id = VALUES(default_tenant_id),
operator_tenant_id = VALUES(operator_tenant_id),
default_membership_id = VALUES(default_membership_id),
default_app_code = VALUES(default_app_code),
deleted = 0;