mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 16:17:13 +01:00
feat: integrate First8 Marketing hyper-personalization system
Enhanced Umami Analytics with First8 Marketing integration for hyper-personalized recommendation engine. Database Enhancements: - PostgreSQL 17 with Apache AGE 1.6.0 (graph database) - TimescaleDB 2.23.0 (time-series optimization) - Extended schema for WooCommerce event tracking - Custom tables for recommendation engine integration Features Added: - Real-time ETL pipeline to recommendation engine - Extended event tracking (WordPress + WooCommerce) - Graph database for relationship mapping - Time-series optimization for analytics queries - Custom migrations for hyper-personalization Documentation: - Updated README with integration details - Added system architecture documentation - Documented data flow and components - Preserved original Umami Software credits Integration Components: - First8 Marketing Track plugin (event tracking) - Recommendation Engine (ML backend) - First8 Marketing Recommendation Engine plugin (presentation) Status: Production-ready Version: Based on Umami latest + First8 Marketing enhancements
This commit is contained in:
parent
a6d4519a98
commit
5f496fdb79
16 changed files with 8856 additions and 9790 deletions
52
db/postgresql/rollback/004_rollback_timescaledb.sql
Normal file
52
db/postgresql/rollback/004_rollback_timescaledb.sql
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
-- Rollback Migration: Remove TimescaleDB Time-Series Tables
|
||||
-- Created: 2025-01-15
|
||||
-- Description: Drops all TimescaleDB hypertables, continuous aggregates, and policies
|
||||
-- WARNING: This will permanently delete all time-series analytics data!
|
||||
|
||||
-- ============================================================================
|
||||
-- Step 1: Remove Continuous Aggregate Policies
|
||||
-- ============================================================================
|
||||
SELECT remove_continuous_aggregate_policy('website_metrics_hourly_agg', if_exists => TRUE);
|
||||
SELECT remove_continuous_aggregate_policy('product_metrics_daily_agg', if_exists => TRUE);
|
||||
|
||||
-- ============================================================================
|
||||
-- Step 2: Drop Continuous Aggregates (Materialized Views)
|
||||
-- ============================================================================
|
||||
DROP MATERIALIZED VIEW IF EXISTS website_metrics_hourly_agg CASCADE;
|
||||
DROP MATERIALIZED VIEW IF EXISTS product_metrics_daily_agg CASCADE;
|
||||
|
||||
-- ============================================================================
|
||||
-- Step 3: Remove Retention Policies
|
||||
-- ============================================================================
|
||||
SELECT remove_retention_policy('time_series_events', if_exists => TRUE);
|
||||
SELECT remove_retention_policy('website_metrics_hourly', if_exists => TRUE);
|
||||
SELECT remove_retention_policy('product_metrics_daily', if_exists => TRUE);
|
||||
|
||||
-- ============================================================================
|
||||
-- Step 4: Drop Hypertables (this will drop the tables and all chunks)
|
||||
-- ============================================================================
|
||||
DROP TABLE IF EXISTS time_series_events CASCADE;
|
||||
DROP TABLE IF EXISTS website_metrics_hourly CASCADE;
|
||||
DROP TABLE IF EXISTS product_metrics_daily CASCADE;
|
||||
|
||||
-- ============================================================================
|
||||
-- Step 5: Drop TimescaleDB Extension (Optional)
|
||||
-- ============================================================================
|
||||
-- Note: Only drop extension if no other hypertables exist
|
||||
-- Uncomment the following line if you want to completely remove TimescaleDB
|
||||
-- DROP EXTENSION IF EXISTS timescaledb CASCADE;
|
||||
|
||||
-- ============================================================================
|
||||
-- Rollback Complete
|
||||
-- ============================================================================
|
||||
DO $$
|
||||
BEGIN
|
||||
RAISE NOTICE '=================================================================';
|
||||
RAISE NOTICE 'TimescaleDB Rollback Complete';
|
||||
RAISE NOTICE 'Dropped hypertables: time_series_events, website_metrics_hourly, product_metrics_daily';
|
||||
RAISE NOTICE 'Dropped continuous aggregates: website_metrics_hourly_agg, product_metrics_daily_agg';
|
||||
RAISE NOTICE 'Removed all retention policies';
|
||||
RAISE NOTICE 'Note: TimescaleDB extension was NOT dropped (may be used by other tables)';
|
||||
RAISE NOTICE '=================================================================';
|
||||
END $$;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue