chatai/supabase/chatai-ui/init.sh

21 lines
383 B
Bash

#!/bin/bash
set -e
export PGUSER=supabase_admin
export PGPASSWORD=postgres
export PGHOST=127.0.0.1
export PGPORT=5432
export PGDATABASE=postgres
echo "Running migrations..."
for file in $(ls /supabase/migrations/*.sql | sort); do
echo "Executing $file"
psql -f "$file"
done
echo "Running seed.sql..."
psql -f /supabase/seed.sql
echo "All SQL scripts executed successfully."