mirror of
https://git.coastit.co.za/caitlin/CRM_ENVR.git
synced 2026-07-10 11:15:43 +02:00
ff56cea4b8
- Introduced new migration for `facebook_accounts` and `facebook_scrape_logs` tables. - Updated the scraping logic to handle Facebook accounts, including success and failure tracking. - Implemented API endpoints for managing Facebook accounts and their scrape logs. - Enhanced user permissions to restrict access to Facebook account management to admins and super admins. - Added a dialog component for displaying and managing Facebook accounts in the UI. - Updated lead fetching logic to include user role checks for assignment and access.
42 lines
1.3 KiB
PL/PgSQL
42 lines
1.3 KiB
PL/PgSQL
-- ============================================================================
|
|
-- CRM Database — Full Migration Runner
|
|
-- ============================================================================
|
|
-- Usage: psql -U postgres -d crm -f run_all.sql
|
|
-- ============================================================================
|
|
|
|
BEGIN;
|
|
\set ON_ERROR_STOP on
|
|
|
|
\echo '=== Running 001_schema.sql (Tables + Constraints + Functions + Views) ==='
|
|
\i 001_schema.sql
|
|
|
|
\echo '=== Running 002_seed.sql (RBAC + Test Accounts + Reference Data) ==='
|
|
\i 002_seed.sql
|
|
|
|
\echo '=== Running 003_chat.sql (Chat Tables) ==='
|
|
\i 003_chat.sql
|
|
|
|
\echo '=== Running 004_avatar_url.sql (Avatar URL Column) ==='
|
|
\i 004_avatar_url.sql
|
|
|
|
\echo '=== Running 005_last_read_at.sql (Last Read At Column) ==='
|
|
\i 005_last_read_at.sql
|
|
|
|
\echo '=== Running 006_test_leads.sql (Test Lead Data) ==='
|
|
\i 006_test_leads.sql
|
|
|
|
\echo '=== Running 007_ai_features.sql (AI Features) ==='
|
|
\i 007_ai_features.sql
|
|
|
|
\echo '=== Running 008_notifications.sql (Notifications + Preferences) ==='
|
|
\i 008_notifications.sql
|
|
|
|
\echo '=== Running 009_settings.sql (Company Settings + User Preferences) ==='
|
|
\i 009_settings.sql
|
|
|
|
\echo '=== Running 010_facebook_accounts.sql (Facebook Account Tracking) ==='
|
|
\i 010_facebook_accounts.sql
|
|
|
|
\echo '=== Migration Complete ==='
|
|
COMMIT;
|