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

Preliminary Donation Routes #13

Merged
merged 13 commits into from
Apr 4, 2024
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cd don-efficace
/.env
/frontend/.env
```
3. Run the application
3. Run the application. Make sure the DATABASE_URL is with scv2_db when building the container.
```bash
docker compose up --build
```
Expand All @@ -65,6 +65,15 @@ docker exec -it scv2-frontend bash -c "yarn fix"
```

## Database/Prisma Information
"npx prisma generate" to generate at the start
"npx prisma db push" to push
"npx prisma studio" to run prisma. Make sure the DATABASE_URL is with localhost

### Creating Prisma Migration

Go to `backend/typescript` and run

npx prisma migrate dev

### Note: Manual Database Setup

Expand All @@ -76,6 +85,7 @@ Update .env file in /backend/typescript to be
```bash
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/scv2
```
Note: if you get errors about prisma functions not existing,you may need to use DATABASE_URL=postgresql://postgres:postgres@db:5432/scv2

Try running (when the docker container is up):

Expand All @@ -91,17 +101,6 @@ nvm install 18.18.2
nvm use 18.18.2
```

### Creating Prisma Migration

Go to `backend/typescript` and run

npx prisma migrate dev

### Useful Prisma Commands
"npx prisma db push" to push
"npx prisma studio" to run prisma


***Need to change scv2 to don-efficace at some point***

## The Team
Expand Down
1 change: 0 additions & 1 deletion backend/typescript/models/entity.model.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Column, Model, Table, DataType } from "sequelize-typescript";

Check warning on line 1 in backend/typescript/models/entity.model.ts

View workflow job for this annotation

GitHub Actions / run-lint

'Column' is defined but never used

Check warning on line 1 in backend/typescript/models/entity.model.ts

View workflow job for this annotation

GitHub Actions / run-lint

'Table' is defined but never used

Check warning on line 1 in backend/typescript/models/entity.model.ts

View workflow job for this annotation

GitHub Actions / run-lint

'DataType' is defined but never used

import { Letters } from "../types";

@Table({ tableName: "entities" })
export default class Entity extends Model {

Check warning on line 6 in backend/typescript/models/entity.model.ts

View workflow job for this annotation

GitHub Actions / run-lint

'Entity' is defined but never used
@Column
string_field!: string;

Expand All @@ -22,4 +22,3 @@
@Column
file_name!: string;
}

Loading
Loading