feat(CC-068): add dataSources to schema

This commit is contained in:
admin-valentin 2026-08-02 12:18:06 +00:00
parent 9cd14e34bb
commit 5dbe2112a9

View file

@ -824,3 +824,19 @@ export const scenarios = pgTable('scenarios', {
createdAt: timestamp('created_at').defaultNow().notNull(),
updatedAt: timestamp('updated_at').defaultNow().notNull(),
});
// ——— CC-068 ———
export const dataSources = pgTable('data_sources', {
id: uuid('id').defaultRandom().primaryKey().notNull(),
tenantId: uuid('tenant_id').notNull(),
name: text('name').notNull(),
sourceType: text('source_type').default('manual').notNull(),
description: text('description'),
connectionInfo: text('connection_info'),
status: text('status').default('active').notNull(),
lastSyncAt: timestamp('last_sync_at'),
recordCount: integer('record_count'),
tags: text('tags').array().default([]).notNull(),
createdAt: timestamp('created_at').defaultNow().notNull(),
updatedAt: timestamp('updated_at').defaultNow().notNull(),
});