Skip to content

Commit

Permalink
Dev UI fix (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
sedeve authored Nov 16, 2023
2 parents 705a4fc + 343629e commit 22abf1c
Show file tree
Hide file tree
Showing 88 changed files with 2,568 additions and 3,196 deletions.
74 changes: 0 additions & 74 deletions backend/code/accountPickerCli.ts

This file was deleted.

4 changes: 2 additions & 2 deletions backend/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"private": true,
"license": "UNLICENSED",
"scripts": {
"build": "nest build",
"build": "npm run db:generate && nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
"start:dev": "npm run db:generate && nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/src/main",
"start:prod": "node dist/main",
"db:generate": "prisma generate",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
Expand Down
13 changes: 13 additions & 0 deletions backend/code/prisma/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:18

# Create app directory
WORKDIR /app

# Install prisma for the migration
RUN npm install -g prisma --unsafe-perm

# Copy schema and migration folder
ADD ./ ./prisma/

# Run migration
CMD ["prisma", "migrate", "deploy"]
8 changes: 6 additions & 2 deletions backend/code/prisma/dbml/schema.dbml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ Table blocked_friends {
createdAt DateTime [default: `now()`, not null]
id String [pk]
Blcoked_by users [not null]
blocked_by_id String [unique, not null]
blocked_by_id String [not null]
Blocked users [not null]
blocked_id String [unique, not null]
blocked_id String [not null]
dmRoomId String

indexes {
(blocked_by_id, blocked_id) [unique]
}
}

Table matches {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
Warnings:
- A unique constraint covering the columns `[blocked_by_id,blocked_id]` on the table `blocked_friends` will be added. If there are existing duplicate values, this will fail.
*/
-- DropIndex
DROP INDEX "blocked_friends_blocked_by_id_key";

-- DropIndex
DROP INDEX "blocked_friends_blocked_id_key";

-- CreateIndex
CREATE UNIQUE INDEX "blocked_friends_blocked_by_id_blocked_id_key" ON "blocked_friends"("blocked_by_id", "blocked_id");
5 changes: 3 additions & 2 deletions backend/code/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ model BlockedUsers {
id String @id
Blcoked_by User @relation("blocked_by", fields: [blocked_by_id], references: [userId], onDelete: Cascade)
blocked_by_id String @unique
blocked_by_id String
Blocked User @relation("blocked", fields: [blocked_id], references: [userId], onDelete: Cascade)
blocked_id String @unique
blocked_id String
dmRoomId String?
@@unique([blocked_by_id, blocked_id], name: "unique_block")
@@map("blocked_friends")
}

Expand Down
162 changes: 0 additions & 162 deletions backend/code/seeder.ts

This file was deleted.

Loading

0 comments on commit 22abf1c

Please sign in to comment.