Skip to content

Commit 11f6ca6

Browse files
authored
Merge pull request #9 from OpenMined/feat/db-migrations
feat: Implement Alembic database migrations
2 parents 2020380 + 8c8195e commit 11f6ca6

12 files changed

Lines changed: 3261 additions & 1730 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Migration Check
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
paths:
7+
- 'backend/**'
8+
9+
jobs:
10+
check-migrations:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.12'
19+
20+
- name: Install just
21+
uses: extractions/setup-just@v2
22+
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v4
25+
26+
- name: Install dependencies
27+
run: |
28+
cd backend
29+
uv pip install -e . --system
30+
31+
- name: Check for multiple heads
32+
run: |
33+
cd backend
34+
just check
35+
36+
- name: Test fresh install
37+
run: |
38+
cd backend
39+
rm -f /tmp/ci_test.db
40+
SQLITE_DB_PATH=/tmp/ci_test.db just upgrade
41+
echo "Fresh install migration succeeded"

0 commit comments

Comments
 (0)