add admin user
This commit is contained in:
parent
3cc66f4e97
commit
8fb48f7243
2 changed files with 8 additions and 1 deletions
|
|
@ -66,6 +66,13 @@ export class CreateUserTable1661234567890 implements MigrationInterface {
|
|||
name: "UQ_user_userName",
|
||||
})
|
||||
);
|
||||
|
||||
// Insert a default admin user - password is stored in shared/recipe-backend
|
||||
await queryRunner.query(
|
||||
`INSERT INTO "user" ("id", "userName", "email", "password", "role")
|
||||
VALUES (uuid_generate_v4(), $1, $2, $3, $4)`,
|
||||
["admin", "anika@raemer.net", "$2b$12$zySMBXDcPF4VWpyvXluYwOS4pWJlED.peAvK9NEMewht6UQGw/8WK", "admin"]
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue