Skip to content

Commit

Permalink
fix: change deleted at column
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaspearson committed Apr 28, 2021
1 parent 1e88783 commit 74c8cb5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api.http
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@baseUrl = http://localhost:3000
@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNjE1MjM5NTY4LCJleHAiOjE2MTUyNDMxNjh9.Go5JxobKVh7RK1VnqENZLrwS8odIRURrMOzlRqO39JI
@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNjE5NjI1NTk2LCJleHAiOjE2MTk3MTE5OTZ9.PhImK7gn87y0h3eup4lKCt0ig5IWKhebZ2Yot4ped98

########################################################################
########### USER ###########
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"db:migration:run": "typeorm migration:run",
"db:start": "run exec:docker-compose up -d --renew-anon-volumes --force-recreate postgres",
"debug": "run build && run watch:debug",
"exec:docker-compose": "docker-compose -f $(pwd)/docker-compose.yaml",
"exec:docker-compose": "docker compose -f $(pwd)/docker-compose.yaml",
"exec:jest": "jest --version && jest --coverage --detectOpenHandles --color --forceExit",
"exec:script:generate-migration": "$(pwd)/scripts/generate-migration.sh",
"lint": "eslint --parser-options \"{ tsconfigRootDir: $(pwd), project: '$(pwd)/tsconfig.json' }\" --cache-file $(pwd)/.eslintcache $(pwd)/src",
Expand Down
3 changes: 2 additions & 1 deletion src/db/entities/user.entity.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
Column,
CreateDateColumn,
DeleteDateColumn,
Entity,
Index,
PrimaryGeneratedColumn,
Expand Down Expand Up @@ -34,6 +35,6 @@ export class User {
@UpdateDateColumn({ name: 'updated_at', type: 'timestamp with time zone' })
updatedAt: Date;

@Column({ name: 'deleted_at', nullable: true, type: 'timestamp with time zone' })
@DeleteDateColumn({ name: 'deleted_at', nullable: true, type: 'timestamp with time zone' })
deletedAt: Nullable<Date>;
}

0 comments on commit 74c8cb5

Please sign in to comment.