Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ms2/read me db commands update #443

Merged
merged 5 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <branch | default>`: switch between dbs, also creates a branch db if not created already \
`yarn dev-ms-db-delete <--all | --branch <branch-name> >` : 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-generate` : 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.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/management-system-v2/lib/data/file-manager-facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion src/management-system-v2/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
Loading