#!/bin/bash # Copied/adapted from novelpad-desktop packages/core/bin/create-migration @ 62c56b87 # Deviation: no client schema in this package, so only the single (server) # drizzle config is generated against, and there is no separate # build:migration-files bundling step to run afterward. if [ "$#" -ne 1 ]; then echo "Usage: create-migration " echo "Or: yarn create:migration " echo "Or: npm run create:migration -- " exit 9 fi echo "Creating migration: ${1}" yarn build yarn drizzle-kit generate --config drizzle.config.ts --name "${1}"