From 5dbe2112a9c0beedb1d9f1e2b54f3cd5743b4754 Mon Sep 17 00:00:00 2001 From: admin-valentin Date: Sun, 2 Aug 2026 12:18:06 +0000 Subject: [PATCH] feat(CC-068): add dataSources to schema --- src/db/schema.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/db/schema.ts b/src/db/schema.ts index 2ef2766..29d2825 100644 --- a/src/db/schema.ts +++ b/src/db/schema.ts @@ -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(), +});