Remove Google Sheets mirror entirely (#13)
Test backoffice (smb-crm) / test (push) Has been cancelled
Test backoffice (smb-crm) / test (push) Has been cancelled
Postgres is now the sole source of truth: delete sheets.py and import_from_sheets.py, strip mirror_entity/mirror_async/_mirror_worker and POST /api/sync from app.py, drop the tab/mirror keys from db.py's TABLES. Re-point n8n/renewal-reminder.json at the CRM's own HTTP API (GET /api/clients, POST /api/activity_log) instead of the Sheets nodes, and drop SHEET_ID/GOOGLE_SA_JSON from deploy env/compose and requests from requirements.txt (PyJWT stays — still used by booking_api.py). Updates docs/README/playbooks accordingly and closes the old #5 (atomic mirror) as moot. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
-- smb-crm — source-of-truth schema (Postgres).
|
||||
-- Google Sheets is a one-way downstream mirror fed by the DB->Sheets sync.
|
||||
-- Column sets mirror the Sheet tabs so the mirror stays 1:1.
|
||||
-- smb-crm — sole source-of-truth schema (Postgres).
|
||||
|
||||
CREATE TABLE IF NOT EXISTS clients (
|
||||
client_id text PRIMARY KEY,
|
||||
@@ -87,8 +85,8 @@ CREATE TABLE IF NOT EXISTS invoices (
|
||||
);
|
||||
|
||||
-- Per-client login credentials (e.g. the auto-generated Easy!Appointments
|
||||
-- provider login). Deliberately NOT mirrored to Sheets — see db.py TABLES
|
||||
-- ("mirror": False) — so secrets never leave Postgres.
|
||||
-- provider login). Gated by X-CRM-Token even to read, so secrets never leave
|
||||
-- Postgres.
|
||||
CREATE TABLE IF NOT EXISTS credentials (
|
||||
cred_id text PRIMARY KEY,
|
||||
client_id text,
|
||||
|
||||
Reference in New Issue
Block a user