diff --git a/apps/api/prisma/migrations/20260901000000_add_category_sort_order/migration.sql b/apps/api/prisma/migrations/20260901000000_add_category_sort_order/migration.sql new file mode 100644 index 0000000..67ec1e2 --- /dev/null +++ b/apps/api/prisma/migrations/20260901000000_add_category_sort_order/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "categories" ADD COLUMN "sort_order" INTEGER NOT NULL DEFAULT 0; diff --git a/apps/api/prisma/schema.prisma b/apps/api/prisma/schema.prisma index 2833af3..489ad57 100644 --- a/apps/api/prisma/schema.prisma +++ b/apps/api/prisma/schema.prisma @@ -161,6 +161,7 @@ model Category { categoryName String @map("category_name") categoryIcon String? @map("category_icon") sdsCategoryId String? @unique @map("sds_category_id") + sortOrder Int @default(0) @map("sort_order") createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6) updatedAt DateTime @default(now()) @updatedAt @map("updated_at") @db.Timestamptz(6)