feat: привязка подсправочника к строкам родителя (parentRowIds)

This commit is contained in:
2026-07-21 10:43:28 +03:00
parent eff91bffad
commit 9edd90211f
6 changed files with 81 additions and 44 deletions

View File

@@ -1859,7 +1859,7 @@ export const dataTableLinks = pgTable("data_table_links", {
childTableId: integer("child_table_id").notNull().references(() => dataTables.id, { onDelete: "cascade" }),
parentColumnIndex: integer("parent_column_index").notNull().default(0),
childColumnIndex: integer("child_column_index").notNull().default(0),
parentValues: jsonb("parent_values").notNull().$type<string[]>().default([]),
parentRowIds: jsonb("parent_row_ids").notNull().$type<number[]>().default([]),
createdAt: timestamp("created_at").defaultNow(),
updatedAt: timestamp("updated_at").defaultNow(),
}, (table) => ({