feat: replace database.sql with initial migration for automatic schema setup (#4447)

- Create initial migration that loads schema on fresh installs only
- Database schema is now version-controlled via migrations
- Remove database.sql build task from gulpfile
- Simplify Docker setup - no longer need sqlscript container
- Update CI workflows to rely on migrations for schema setup
- Update INSTALL.md documentation for automatic schema creation

Migrations now handle the complete database lifecycle:
- Fresh install: Initial migration creates full schema
- Existing install: Skips initial schema, continues normally
- No manual database.sql import needed
This commit is contained in:
Ollama
2026-03-18 09:44:23 +00:00
parent fd6b668a79
commit 107ed2b65c
8 changed files with 886 additions and 78 deletions

View File

@@ -69,9 +69,6 @@ jobs:
- name: Install npm dependencies
run: npm install
- name: Build database.sql
run: npm run gulp build-database
- name: Start MariaDB
run: |
docker run -d --name mysql \
@@ -79,7 +76,6 @@ jobs:
-e MYSQL_DATABASE=ospos \
-e MYSQL_USER=admin \
-e MYSQL_PASSWORD=pointofsale \
-v $PWD/app/Database/database.sql:/docker-entrypoint-initdb.d/database.sql \
-p 3306:3306 \
mariadb:10.5
# Wait for MariaDB to be ready