From da21ad987a2cb4553a90fa1b1402cbc8521836e0 Mon Sep 17 00:00:00 2001 From: anish Date: Thu, 16 Jan 2025 21:49:54 +0100 Subject: [PATCH 1/3] updated readme.md --- README.md | 9 +++++++++ package.json | 1 + 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 7d7d9255a..0a5ad4466 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,15 @@ When you have started the development code of the Management System, the first i Both users actually have the same privileges by default, but the first one logging in can see the _System Dashboard_ and becomes the _System Admin_. +**Local Development with DB : Helper commands** \ +`yarn dev-ms-db` : starts the docker container and setups the default db \ +`yarn dev-ms-db-create`: create a new branch specific database \ +`yarn dev-ms-db-use `: switch between dbs, also creates a branch db if not created already \ +`yarn dev-ms-db-delete <--all | --branch >` : delete db \ +`yarn dev-ms-db-migrate`: create new prisma migration based on changes made to `schema.prisma` file \ +`yarn dev-ms-db-deploy` : deploys the migrations to db \ +`yarn dev-ms-db-deploy` : run this command to generate prisma client manually, if not generated automatically on `yarn install`` + # Contributions If you are interested in developing PROCEED further, we are very open for help and project contributions. Regularly there are on-boarding development workshops and, if you are interested, we have weekly video calls with all developers. diff --git a/package.json b/package.json index ae4fa8892..5c28c66bb 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "dev-ms-db-migrate": "cd src/management-system-v2 && yarn prisma migrate dev", "dev-ms-db-use": "cd src/management-system-v2 && tsx scripts/db-helper.mts --use", "dev-ms-db-delete": "cd src/management-system-v2 && tsx scripts/db-helper.mts --delete", + "dev-ms-db-generate": "cd src/management-system-v2 && yarn prisma generate", "dev-ms": "cd src/management-system-v2 && yarn dev", "dev-ms-old": "cd src/management-system && yarn web:dev", "dev-ms-old-iam": "cd src/management-system && yarn web:dev-iam", From 3b57d84fa6b266573f44f6c1e0e87b5584170442 Mon Sep 17 00:00:00 2001 From: anish Date: Thu, 16 Jan 2025 21:50:32 +0100 Subject: [PATCH 2/3] minor refCounter bug fix --- src/management-system-v2/lib/data/file-manager-facade.ts | 2 +- src/management-system-v2/prisma/schema.prisma | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/management-system-v2/lib/data/file-manager-facade.ts b/src/management-system-v2/lib/data/file-manager-facade.ts index 40223d34a..e2a24af8e 100644 --- a/src/management-system-v2/lib/data/file-manager-facade.ts +++ b/src/management-system-v2/lib/data/file-manager-facade.ts @@ -327,7 +327,7 @@ export async function updateArtifactProcessReference( processId: string, status: boolean, ) { - if (DEPLOYMENT_ENV !== 'cloud') return; + //if (DEPLOYMENT_ENV !== 'cloud') return; const artifact = await db.artifact.findUnique({ where: { fileName }, diff --git a/src/management-system-v2/prisma/schema.prisma b/src/management-system-v2/prisma/schema.prisma index ea6d4c5dd..fd6531431 100644 --- a/src/management-system-v2/prisma/schema.prisma +++ b/src/management-system-v2/prisma/schema.prisma @@ -93,7 +93,7 @@ model Artifact { artifactType String // user-task, script, image, etc. processReferences ArtifactProcessReference[] // Relation to track references versionReferences ArtifactVersionReference[] - refCounter Int @default(1) + refCounter Int @default(0) @@map("artifact") } From e70f7aa8cc489f9a9a4b58dc3d33e4f4069f5d84 Mon Sep 17 00:00:00 2001 From: anish Date: Mon, 20 Jan 2025 17:22:06 +0100 Subject: [PATCH 3/3] fix: readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0a5ad4466..5045f0b5f 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ Both users actually have the same privileges by default, but the first one loggi `yarn dev-ms-db-delete <--all | --branch >` : delete db \ `yarn dev-ms-db-migrate`: create new prisma migration based on changes made to `schema.prisma` file \ `yarn dev-ms-db-deploy` : deploys the migrations to db \ -`yarn dev-ms-db-deploy` : run this command to generate prisma client manually, if not generated automatically on `yarn install`` +`yarn dev-ms-db-generate` : run this command to generate prisma client manually, if not generated automatically on `yarn install`` # Contributions