Skip to content

Commit 12d1c8c

Browse files
Add auth0 sub for default user in migration
1 parent 51b4019 commit 12d1c8c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

api/src/migrations/1567049233839-initial_data.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { MigrationInterface, QueryRunner } from "typeorm";
22

33
import { SEMESTERLY_MEMBERSHIP, YEARLY_MEMBERSHIP } from "../lib/products";
44

5+
const DEFAULT_SUB = "google-oauth2|115625753701019295484";
6+
57
/**
68
* Adds the initial superadmin user "[email protected]" and the initial
79
* products "ACM Semester Membership" and "ACM Yearly Membership".
@@ -14,7 +16,7 @@ export class initialData1567049233839 implements MigrationInterface {
1416
.into("user")
1517
.values([
1618
{
17-
sub: "test",
19+
sub: DEFAULT_SUB,
1820
firstName: "MST",
1921
lastName: "ACM",
2022
@@ -56,7 +58,7 @@ export class initialData1567049233839 implements MigrationInterface {
5658
await queryBuilder
5759
.delete()
5860
.from("user")
59-
.where("sub = :sub", { sub: "test" })
61+
.where("sub = :sub", { sub: DEFAULT_SUB })
6062
.execute();
6163

6264
await queryBuilder

0 commit comments

Comments
 (0)