Version 1.0.39
AmCEO Cloud Database Schema
Last updated: August 2026
Set up your own Supabase database to sync AmCEO data securely to the cloud. Run this SQL once in your Supabase project and AmCEO will handle the rest. The schema now covers CRM, Inventory, full Finance, HR Cloud Sync (including staff document uploads via a private Storage bucket), and POS sessions/receipts — not only business profile tables.
47
Tables
10
Modules covered
AmCEO Cloud Sync v1.0.39+
Compatible with
Current Cloud Sync SQL (v1.0.39, 47 tables) includes CRM (companies, contacts, deals, activities), Inventory (products and movements), full Finance (chart of accounts, transactions, invoices, bills, journals, budgets, payables, bank accounts, invoice/bill payments, reconciliations, credit), HR (employees, leave, contracts, contract history, payroll runs, staff document metadata) plus a private Storage bucket amceo-hr-documents for staff file blobs, and POS (sessions + receipt transactions with meta). Also covered: supply chain, assets, marketing, helpdesk, tasks, industry module data, livestock production, and client error reports. TIN/SSNIT and full bank account numbers stay local-only; cloud HR uses bank last-4. POS does not sync product catalogs or cart drafts. Tables use tenant isolation and IF NOT EXISTS so the script is safe to re-run.
How to set up Cloud Sync
- 1
Create a free project at supabase.com
Open Supabase - 2
In your Supabase dashboard, open SQL Editor
- 3
Click "Download SQL" above and paste it into the SQL Editor, then click Run (It is safe to run multiple times — all statements use IF NOT EXISTS)
- 4
Copy your Project URL and anon key from Supabase → Settings → API
- 5
In AmCEO: Settings → Deployment → Cloud Sync → Enter your credentials
Modules covered
Finance tables in this schema
Expanded Finance Cloud Sync (through schema v1.0.34) includes these core tables among others:
- finance_accounts (COA)
- finance_journal_entries
- finance_invoices / finance_bills
- finance_invoice_payments / finance_bill_payments
- finance_bank_accounts (last-4 only)
- finance_reconciliations
- credit_accounts / credit_transactions
HR tables & Storage in this schema
HR Cloud Sync H0–H5b (schema v1.0.35–v1.0.38) adds employee, leave, contract, payroll, and staff document sync. Sensitive identifiers stay local: no TIN/SSNIT columns in cloud; bank accounts sync last-4 only. Document file blobs live in the private amceo-hr-documents Storage bucket (metadata + path in hr_staff_documents).
- hr_employees (bank last-4; no TIN/SSNIT columns)
- hr_leave_requests
- hr_contracts / hr_contract_history
- hr_payroll_runs (append-only envelopes)
- hr_staff_documents (metadata + Storage path)
- Storage bucket: amceo-hr-documents (private)
POS tables in this schema
POS Cloud Sync P0/P1 (schema v1.0.39) syncs till sessions and receipt transactions only. Pull must not re-apply Inventory or Finance side effects. Closed sessions and voided/refunded statuses are terminal. Product catalogs, cart drafts, and Z-report rows stay local/derived.
- pos_sessions (meta; closed is terminal)
- pos_transactions (receipts; voided/refunded terminal)
- No pos_products / cart drafts / Z-report rows
API Reference
Use these endpoints from AmCEO or your own integrations to fetch schema metadata and SQL.
GET/api/schema/latest
Full schema JSON with SQL, checksum, and modules
GET/api/schema/version
Version info and changelog
GET/api/schema/download
Download raw SQL file
Changelog
This schema is provided as-is. AmCEO stores your data in YOUR Supabase project — we do not have access to your business data.