mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Add stock status columns to product management
Update database schema to include `stock_epuise`, `stock_epuise_by`, and `stock_epuise_at` columns in the `dlc_products` table and adjust Dockerfile and production commands for immediate application. Replit-Commit-Author: Agent Replit-Commit-Session-Id: f9197b9b-a5b3-4469-a27d-930a9e9ee736 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/f9197b9b-a5b3-4469-a27d-930a9e9ee736/i2gFnxm
This commit is contained in:
1 parent
b383363e45
commit
e5d66bd1d5
3 files changed
+60
-86
No files matched your search
+2
-2
@@ -114,5 +114,5 @@ RUN chmod +x /app/scripts/auto-migrate-production.sh && \
|
||||
ls -la /app/scripts/ && \
|
||||
test -f /app/scripts/docker-entrypoint.sh || echo "ERREUR: docker-entrypoint.sh manquant"
|
||||
|
||||
# Apply migrations and start application
|
||||
CMD ["sh", "-c", "if [ -f /app/scripts/auto-sync-migrations.sh ]; then /app/scripts/auto-sync-migrations.sh; fi && node dist/index.js"]
|
||||
# Apply DLC migration directly and start application
|
||||
CMD ["sh", "-c", "echo 'Applying DLC migration...'; if [ -n \"$DATABASE_URL\" ]; then psql \"$DATABASE_URL\" -c 'ALTER TABLE dlc_products ADD COLUMN IF NOT EXISTS stock_epuise boolean DEFAULT false NOT NULL, ADD COLUMN IF NOT EXISTS stock_epuise_by varchar(255), ADD COLUMN IF NOT EXISTS stock_epuise_at timestamp; CREATE INDEX IF NOT EXISTS idx_dlc_products_stock_epuise ON dlc_products(stock_epuise);' || echo 'Migration already applied or failed'; fi; node dist/index.js"]
|
||||
Reference in new issue
Block a user