fix(seeder): use uppercase ACTIVE status to match backend validation
This commit is contained in:
parent
625bfc1e89
commit
f7127235cc
1 changed files with 4 additions and 4 deletions
|
|
@ -23,7 +23,7 @@ export async function seedUsers() {
|
|||
|
||||
const result = await pool.query(`
|
||||
INSERT INTO users (identifier, password_hash, role, full_name, email, name, tenant_id, status)
|
||||
VALUES ($1, $2, 'superadmin', $3, $4, $5, $6, 'active')
|
||||
VALUES ($1, $2, 'superadmin', $3, $4, $5, $6, 'ACTIVE')
|
||||
ON CONFLICT (identifier) DO UPDATE SET password_hash = EXCLUDED.password_hash
|
||||
RETURNING id
|
||||
`, ['superadmin', superAdminPassword, 'System Administrator', 'admin@gohorsejobs.com', 'System Administrator', systemTenantId]);
|
||||
|
|
@ -58,7 +58,7 @@ export async function seedUsers() {
|
|||
|
||||
const result = await pool.query(`
|
||||
INSERT INTO users (identifier, password_hash, role, full_name, email, name, tenant_id, status)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7, 'active')
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7, 'ACTIVE')
|
||||
ON CONFLICT (identifier) DO UPDATE SET password_hash = EXCLUDED.password_hash
|
||||
RETURNING id
|
||||
`, [admin.identifier, hash, admin.roles[0], admin.fullName, admin.email, admin.fullName, tenantId]);
|
||||
|
|
@ -87,7 +87,7 @@ export async function seedUsers() {
|
|||
|
||||
const result = await pool.query(`
|
||||
INSERT INTO users (identifier, password_hash, role, full_name, email, name, status)
|
||||
VALUES ($1, $2, 'candidate', $3, $4, $5, 'active')
|
||||
VALUES ($1, $2, 'candidate', $3, $4, $5, 'ACTIVE')
|
||||
ON CONFLICT (identifier) DO UPDATE SET password_hash = EXCLUDED.password_hash
|
||||
RETURNING id
|
||||
`, [cand.identifier, hash, cand.fullName, cand.email, cand.fullName]);
|
||||
|
|
@ -179,7 +179,7 @@ export async function seedUsers() {
|
|||
INSERT INTO users (
|
||||
identifier, password_hash, role, full_name, email, name, phone,
|
||||
city, state, title, experience, skills, objective, bio, status
|
||||
) VALUES ($1, $2, 'candidate', $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, 'active')
|
||||
) VALUES ($1, $2, 'candidate', $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, 'ACTIVE')
|
||||
ON CONFLICT (identifier) DO UPDATE SET
|
||||
full_name = EXCLUDED.full_name,
|
||||
email = EXCLUDED.email,
|
||||
|
|
|
|||
Loading…
Reference in a new issue