Seed ไฟล์ตัวอย่างแบบ idempotent sync กับ public/samples/
- scripts/seed-samples.mjs: INSERT ไฟล์ที่ยังไม่มี row + DELETE row ที่ไฟล์หาย (CASCADE ลบ annotation ตาม) — แทน SQL seed มือเดิมใน README - รันอัตโนมัติตอน container start ต่อจาก migrate + npm run seed-samples บนเครื่อง dev - สลับไฟล์ sample เป็นคำสั่งศาล 2 ฉบับ Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
parent
ec26d79f0e
commit
79c9e2cc41
7 changed files with 47 additions and 3 deletions
|
|
@ -7,6 +7,7 @@
|
|||
"build": "next build",
|
||||
"test": "vitest run",
|
||||
"start": "next start",
|
||||
"seed-samples": "node --env-file=.env scripts/seed-samples.mjs",
|
||||
"postinstall": "node -e \"require('fs').copyFileSync('node_modules/pdfjs-dist/build/pdf.worker.min.mjs','public/pdf.worker.min.mjs')\""
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue