Skip to content

Commit efeb95e

Browse files
authored
Merge branch 'main' into feat/issue-43-contract-event-indexer
2 parents 6ea14a2 + af40ff5 commit efeb95e

25 files changed

+4194
-1416
lines changed

.github/workflows/backend-tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ on:
44
pull_request:
55
paths:
66
- 'backend/**'
7+
- 'docs/MIGRATION.md'
78
- '.github/workflows/backend-tests.yml'
89
push:
910
branches:
1011
- main
1112
- develop
1213
paths:
1314
- 'backend/**'
15+
- 'docs/MIGRATION.md'
1416

1517
jobs:
1618
test:
@@ -35,13 +37,17 @@ jobs:
3537
working-directory: backend
3638
run: npm ci
3739

40+
- name: Verify migrations (dry-run)
41+
working-directory: backend
42+
run: npm run db:migrate:dry-run
43+
3844
- name: Run tests
3945
working-directory: backend
4046
run: npm run test
4147

4248
- name: Upload test results
4349
if: always()
44-
uses: actions/upload-artifact@v3
50+
uses: actions/upload-artifact@v4
4551
with:
4652
name: test-results-${{ matrix.node-version }}
4753
path: backend/coverage/

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ cp backend/.env.example backend/.env
6767
cp frontend/.env.example frontend/.env
6868
# Edit with contract addresses
6969

70+
**Database migrations** (when using PostgreSQL with `DATABASE_URL`): see [docs/MIGRATION.md](docs/MIGRATION.md). Apply with `cd backend && npm run db:migrate`; use `--dry-run` to preview.
71+
7072
Configure SMTP for Email Notifications (Optional)
7173

7274
To enable email notifications for rebalancing events:

backend/data/portfolio.db-shm

-32 KB
Binary file not shown.

backend/data/portfolio.db-wal

-302 KB
Binary file not shown.

backend/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"build": "tsc",
88
"start": "node dist/index.js",
99
"db:migrate": "tsx src/db/migrate.ts",
10+
"db:migrate:dry-run": "tsx src/db/migrate.ts -- --dry-run",
11+
"db:migrate:rollback": "tsx src/db/migrate.ts -- --rollback",
12+
"db:migrate:status": "tsx src/db/migrate.ts -- --status",
1013
"db:setup": "tsx src/db/migrate.ts",
1114
"test": "vitest run",
1215
"test:watch": "vitest"

0 commit comments

Comments
 (0)