Spaces:
Sleeping
Sleeping
Download src/utils/migrate.js from ahn009/oxinto-backend: direct link, hf CLI and curl.
- Browser
- Download file 387 Bytes
-
https://huggingface.co/spaces/ahn009/oxinto-backend/resolve/main/src/utils/migrate.js
- Command line
-
hf download hf://spaces/ahn009/oxinto-backend/src/utils/migrate.js
-
curl -L -o migrate.js https://huggingface.co/spaces/ahn009/oxinto-backend/resolve/main/src/utils/migrate.js
387 Bytes
| ; | |
| require('dotenv').config(); | |
| const { initDatabase } = require('../config/database'); | |
| const logger = require('./logger'); | |
| async function migrate() { | |
| logger.info('Running database migration...'); | |
| await initDatabase(); | |
| logger.info('Migration complete.'); | |
| process.exit(0); | |
| } | |
| migrate().catch((err) => { | |
| logger.error('Migration failed:', err); | |
| process.exit(1); | |
| }); | |