mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 13:19:09 +03:00
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:
1 parent
ddbc4a9c6f
commit
f2ad713049
1 file changed
+14
+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,
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in new issue
Block a user