diff --git a/apps/backend/src/app/db/schema.ts b/apps/backend/src/app/db/schema.ts index 8adc553..a8135ce 100644 --- a/apps/backend/src/app/db/schema.ts +++ b/apps/backend/src/app/db/schema.ts @@ -68,6 +68,10 @@ export const FilesTable = pgTable("files", { .default("anonyme") .notNull(), + groupId: p + .uuid("group_id") + .references(()=> FilesGroupTable.uuid), + fileSize: p.integer("file_size").notNull(), //TODO Replace by file type reference @@ -92,6 +96,18 @@ export const FilesTable = pgTable("files", { .notNull(), }); +export const FilesGroupTable = pgTable("f_groups", { + // Unique identifier on a technical aspect. + uuid: p.uuid("uuid").unique().primaryKey().defaultRandom().notNull(), + + groupName: p + .varchar("group_name", { + length: 64, + }) + .unique() + .notNull(), +}) + //TODO Files types export const FilesTypesTable = pgTable("f_types", { //uuid