Files
clienthub/src/db/migrations/0001_add_services_table.sql
T
simone e4ddb878ff feat(07-unified-service-catalog): add services table to schema with audit trail columns
- New `services` pgTable with: id, name, description, unit_price, category, active, migrated_from, migrated_id, created_at
- Audit trail columns (migrated_from, migrated_id) enable rollback safety during expand-contract migration
- Service and NewService TypeScript types exported
- Migration SQL file created (0001_add_services_table.sql) for schema push
- No FK relations added yet (Phase 8 will establish connections)
- service_catalog, offer_services tables unchanged — legacy compatibility preserved
- npm run build passes TypeScript checks

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-11 06:21:35 +02:00

12 lines
310 B
SQL

CREATE TABLE "services" (
"id" text PRIMARY KEY NOT NULL,
"name" text NOT NULL,
"description" text,
"unit_price" numeric(10, 2) NOT NULL,
"category" text,
"active" boolean DEFAULT true NOT NULL,
"migrated_from" text,
"migrated_id" text,
"created_at" timestamp with time zone DEFAULT now() NOT NULL
);