♻️(yhub) maintain database schema using npm run init-db

The yhub database schema have new update and will probably be modified
in the future. We don't want to maintain this sql schema in the Docs
repo, we want to reuse what is directly made in the yhub project. For
this we reuse the existing bin/init-db.js script
This commit is contained in:
Manuel Raynaud
2026-09-01 15:28:10 +02:00
committed by Anthony LC
parent 93ec015a61
commit 346811ac3a
6 changed files with 48 additions and 24 deletions
+8 -7
View File
@@ -226,13 +226,6 @@ jobs:
working-directory: .
run: bin/generate-jwt-private-key.sh
- name: Create the collaboration server database
run: |
PGPASSWORD=pass psql -h localhost -U dinum -d impress \
-c 'CREATE DATABASE yhub'
PGPASSWORD=pass psql -h localhost -U dinum -d yhub \
-f ../../docker/files/yhub/initdb/01-yhub.sql
- name: Generate a MO file from strings extracted from the project
run: uv run python manage.py compilemessages
@@ -245,6 +238,14 @@ jobs:
working-directory: src/yhub-server
run: npm ci --omit=dev
# yhub ships its own DDL and creates the database as well, so this needs
# the dependencies installed above — hence its place after them
- name: Create the collaboration server database
working-directory: src/yhub-server
env:
POSTGRES: postgres://dinum:pass@localhost:5432/yhub
run: npm run init-db
- name: Start the backend for the collaboration server to authenticate against
env:
DJANGO_ALLOWED_HOSTS: "*"