fix migration, add create swipe route
This commit is contained in:
@@ -8,6 +8,7 @@ export class InitSchema1695130227420 implements MigrationInterface {
|
||||
"name" varchar NOT NULL,
|
||||
"password" varchar NOT NULL,
|
||||
email varchar NOT NULL,
|
||||
"createdAt" timestamp NOT NULL DEFAULT now(),
|
||||
CONSTRAINT "users_pk" PRIMARY KEY (id),
|
||||
CONSTRAINT "users_email_unique" UNIQUE (email)
|
||||
);
|
||||
@@ -18,7 +19,7 @@ export class InitSchema1695130227420 implements MigrationInterface {
|
||||
"createdAt" timestamp NOT NULL DEFAULT now(),
|
||||
"sourceUserId" int4 NULL,
|
||||
"targetUserId" int4 NULL,
|
||||
CONSTRAINT "PK_bb38af5831e2c084a78e3622ff6" PRIMARY KEY (id)
|
||||
CONSTRAINT "swipes_pk" PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
ALTER TABLE swipes ADD CONSTRAINT "swipes_target_user_fk" FOREIGN KEY ("targetUserId") REFERENCES users(id);
|
||||
@@ -26,6 +27,7 @@ export class InitSchema1695130227420 implements MigrationInterface {
|
||||
|
||||
CREATE TABLE pairs (
|
||||
id serial4 NOT NULL,
|
||||
"createdAt" timestamp NOT NULL DEFAULT now(),
|
||||
CONSTRAINT "pairs_pk" PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user