fix: bundle migration script and ensure file_hash column exists
- Compile src/db/migrate.ts to dist/migrate.js during build - Copy dist/migrate.js to Stage 2 (runner) inside Dockerfile - Run bun dist/migrate.js on db:migrate command - Modify schema.sql to use CREATE TABLE IF NOT EXISTS and ALTER TABLE to add file_hash to existing database instances on VPS Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
b2de5f583d
commit
bf6d5f04c4
@@ -22,6 +22,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
# Copy built files, schema, and package.json
|
||||
COPY --from=builder /usr/src/app/dist/index.js ./dist/index.js
|
||||
COPY --from=builder /usr/src/app/dist/migrate.js ./dist/migrate.js
|
||||
COPY schema.sql ./
|
||||
COPY package.json ./
|
||||
|
||||
|
||||
Reference in New Issue
Block a user