18 lines
392 B
PL/PgSQL
18 lines
392 B
PL/PgSQL
-- 可选:平台租户初始化(与 entity.PlatformTenantID / TenantCode 约定一致)
|
|
-- 需在 001_iam.sql 执行成功后运行
|
|
|
|
BEGIN;
|
|
|
|
INSERT INTO iam_tenant (id, tenant_code, tenant_name, status, created_at, updated_at)
|
|
VALUES (
|
|
'00000000-0000-0000-0000-000000000001',
|
|
'platform',
|
|
'平台',
|
|
1,
|
|
now(),
|
|
now()
|
|
)
|
|
ON CONFLICT (tenant_code) DO NOTHING;
|
|
|
|
COMMIT;
|