predikt/oracle/backend/scripts/dump-love-tables.sh
caelum0x 2b68bde5d5 Predikt: full Polymarket-style prediction market — web + mobile + on-chain + bots
Working tree is now the canonical repo. Off-chain play-money + trustless on-chain
(FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution,
mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 23:29:50 +03:00

38 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
export PGPASSWORD=$SUPABASE_PASSWORD
DB_NAME="db.mfodonznyfxllcezufgr.supabase.co" # dev
# DB_NAME="db.pxidrgkatumlvfqaxcll.supabase.co" # prod
# Connect to the database and initialize tables
psql -U postgres -d postgres -h $DB_NAME -p 5432 -w -f ./dump-lovers-temp.sql
pg_dump -U postgres -d postgres -h $DB_NAME -n public -w \
-t lover_comments \
-t lovers \
-t love_answers \
-t love_compatibility_answers \
-t love_likes \
-t love_questions \
-t love_ships \
-t love_waitlist \
-t private_user_message_channels \
-t private_user_message_channel_members \
-t private_user_seen_message_channels \
-t temp_users \
-t temp_love_messages \
> gen-love-dump.sql
# TODO: just copy pasta these functions from functions.sql
# --function firebase_uid \
# --function get_average_rating \
# --function get_compatibility_questions_with_answer_count \
# --function get_love_question_answers_and_lovers \
# --function millis_interval \
# --function millis_to_ts \
# --function random_alphanumeric \
# --function to_jsonb \
# --function ts_to_millis \
psql -U postgres -d postgres -h $DB_NAME -p 5432 -w -f ./dump-lovers-cleanup.sql