Move Ghost membership sync from blog to account service so blog no longer queries account tables (users, ghost_labels, etc.). Account runs membership sync at startup and exposes HTTP action/data endpoints for webhook-triggered syncs and user lookups. Key changes: - account/services/ghost_membership.py: all membership sync functions - account/bp/actions + data: ghost-sync-member, user-by-email, newsletters - blog ghost_sync.py: stripped to content-only (posts, authors, tags) - blog webhook member: delegates to account via call_action() - try_publish: opens federation session when DBs differ - oauth.py callback: uses get_account_session() for OAuthCode - page_configs moved from db_events to db_blog in split script Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
534 B
SQL
18 lines
534 B
SQL
-- Move page_configs data from db_events to db_blog.
|
|
-- Run after split-databases.sh if page_configs data ended up in db_events.
|
|
--
|
|
-- Usage:
|
|
-- PGHOST=db PGUSER=postgres PGPASSWORD=change-me psql -f move-page-configs.sql
|
|
--
|
|
|
|
-- Step 1: Dump page_configs from db_events into db_blog
|
|
\c db_events
|
|
COPY page_configs TO '/tmp/page_configs.csv' WITH CSV HEADER;
|
|
|
|
\c db_blog
|
|
TRUNCATE page_configs;
|
|
COPY page_configs FROM '/tmp/page_configs.csv' WITH CSV HEADER;
|
|
|
|
-- Step 2: Verify
|
|
SELECT count(*) AS blog_page_configs FROM page_configs;
|