Files
2025-05-28 09:55:51 +08:00

41 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -ex
# to watch and push
# nodemon --delay 1 --ext sql -w supabase --exec "./db_push.sh"
#
export DB_URL="postgres://postgres:your-super-secret-and-long-postgres-password@127.0.0.1:5432/postgres"
# export SUPABASE_ACCESS_TOKEN="your-super-secret-jwt-token-with-at-least-32-characters-long"
echo "y" | npx supabase db reset --db-url $DB_URL
# --debug
# npx supabase db push --dry-run --db-url $DB_URL
# npx supabase db diff --db-url $DB_URL
# npx supabase db dump --db-url $DB_URL \
# -f ./dump.sql
# npx supabase db lint --db-url $DB_URL
# npx supabase db pull --db-url $DB_URL
# npx supabase db push --db-url $DB_URL
# npx supabase migration new create_employees_table
# npx supabase db start --db-url $DB_URL
# npx supabase db push --db-url $DB_URL
# npx supabase db pull --db-url $DB_URL
# npx supabase db pull --schema auth,storage --db-url $DB_URL
# npx supabase db reset --db-url $DB_URL
# npx supabase seed
set +x
echo -e ""
echo -e "\033[32m| DONE, DONE, DONE |\033[0m"
echo -e "\033[32m| DONE, DONE, DONE |\033[0m"
echo -e ""