feat: add third template option to Analytics category

- Add 'metrics' table template for custom KPI tracking
- Ensures all template categories have exactly 3 options
This commit is contained in:
Sean Oliver committed 2025-09-19 11:57:48 -07:00
1 parent ddbc4a9c6f
commit f2ad713049
1 file changed
+14
@@ -173,5 +173,19 @@ export const tableTemplates: Record<string, TableSuggestion[]> = {
rationale: 'Page view tracking',
source: 'template' as const,
},
{
tableName: 'metrics',
fields: [
{ name: 'id', type: 'uuid', nullable: false, isPrimary: true, default: 'gen_random_uuid()' },
{ name: 'metric_name', type: 'varchar', nullable: false },
{ name: 'value', type: 'numeric', nullable: false },
{ name: 'tags', type: 'jsonb', nullable: true },
{ name: 'timestamp', type: 'timestamptz', nullable: false, default: 'now()' },
{ name: 'aggregation_period', type: 'varchar', nullable: true },
{ name: 'created_at', type: 'timestamptz', nullable: false, default: 'now()' },
],
rationale: 'Custom metrics and KPI tracking',
source: 'template' as const,
},
],
}