Skip to content

Commit

Permalink
feat(envited.ascs.digital): Add isActive flag to user table and migra… (
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenbranje authored Jan 30, 2024
2 parents 6f1e9be + 002e272 commit 1506fcb
Show file tree
Hide file tree
Showing 10 changed files with 1,474 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ describe('common/database/users', () => {
streetAddress: 'Teststraße 1',
updatedAt: new Date(),
vatId: 'vatId',
isActive: true,
})
expect(transaction).toEqual({
id: 'USER_ID',
Expand Down
1 change: 1 addition & 0 deletions apps/envited.ascs.digital/common/database/queries/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export const _txn =
issuerId: id,
issuanceDate: new Date(issuanceDate),
expirationDate: new Date(expirationDate),
isActive: true,
createdAt: new Date(),
updatedAt: new Date(),
})
Expand Down
1 change: 1 addition & 0 deletions apps/envited.ascs.digital/common/database/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const user = pgTable('user', {
addressTypeId: uuid('address_type_id').references(() => addressType.id),
issuanceDate: timestamp('issuance_date'),
expirationDate: timestamp('expiration_date'),
isActive: boolean('is_active').default(true),
createdAt: timestamp('created_at'),
updatedAt: timestamp('updated_at'),
})
Expand Down
1 change: 1 addition & 0 deletions apps/envited.ascs.digital/common/database/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export interface User {
issuerId: StringChange
issuanceDate: string
expirationDate: string
isActive: boolean
createdAt: string
updatedAt: string
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "user" ADD COLUMN "is_active" boolean DEFAULT true;
Loading

0 comments on commit 1506fcb

Please sign in to comment.