Foundation for the sx-pub federated publishing protocol: - 6 SQLAlchemy models: actor, collections, documents, activities, followers, following - Conditional DB enablement in sx_docs (DATABASE_URL present → enable DB) - Python IO helpers: get_or_create_actor (auto-generates RSA keypair), list_collections, check_status, seed_default_collections - 4 defhandler endpoints returning text/sx (no JSON): /pub/actor, /pub/webfinger, /pub/collections, /pub/status - Alembic migration infrastructure for sx service - Docker compose: DB + pgbouncer + IPFS + env vars Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
18 lines
329 B
Python
18 lines
329 B
Python
from alembic import context
|
|
from shared.db.alembic_env import run_alembic
|
|
|
|
MODELS = [
|
|
"shared.models.sx_pub",
|
|
]
|
|
|
|
TABLES = frozenset({
|
|
"sx_pub_actor",
|
|
"sx_pub_collections",
|
|
"sx_pub_documents",
|
|
"sx_pub_activities",
|
|
"sx_pub_followers",
|
|
"sx_pub_following",
|
|
})
|
|
|
|
run_alembic(context.config, MODELS, TABLES)
|