mirror of
https://github.com/greedychipmunk/agent-skills.git
synced 2026-09-14 20:46:42 +08:00
28 lines
605 B
Bash
Executable File
28 lines
605 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Run Migrations Script for MedusaJS
|
|
# Runs all pending migrations, syncs links, and runs data migration scripts
|
|
# Usage: ./scripts/run-migrations.sh [--skip-links] [--skip-data]
|
|
|
|
set -e
|
|
|
|
echo "Running database migrations..."
|
|
|
|
ARGS=""
|
|
|
|
# Check for skip links flag
|
|
if [[ "$*" == *"--skip-links"* ]]; then
|
|
ARGS="$ARGS --skip-links"
|
|
echo "Skipping link synchronization"
|
|
fi
|
|
|
|
# Check for skip data flag
|
|
if [[ "$*" == *"--skip-data"* ]]; then
|
|
ARGS="$ARGS --skip-data"
|
|
echo "Skipping data migration scripts"
|
|
fi
|
|
|
|
npx medusa db:migrate $ARGS
|
|
|
|
echo "Migrations completed successfully!"
|