From 61bf7f6162564ae34973e376cba37fe1b57bf98c Mon Sep 17 00:00:00 2001 From: wilson Date: Tue, 17 Mar 2026 06:39:42 +0000 Subject: [PATCH] fix: Reset prisma after poor use of PhotoPost.title field --- generated/prisma/commonInputTypes.ts | 140 ------------------ generated/prisma/internal/class.ts | 8 +- generated/prisma/internal/prismaNamespace.ts | 20 +-- .../prisma/internal/prismaNamespaceBrowser.ts | 13 +- generated/prisma/models/PhotoPost.ts | 98 +----------- .../migration.sql | 24 --- .../migration.sql | 30 ---- prisma/schema.prisma | 4 - 8 files changed, 9 insertions(+), 328 deletions(-) delete mode 100644 prisma/migrations/20260313211532_add_fields_to_photo_stream/migration.sql delete mode 100644 prisma/migrations/20260314083527_change_filepath_to_filename/migration.sql diff --git a/generated/prisma/commonInputTypes.ts b/generated/prisma/commonInputTypes.ts index 37f5cb5..df85a77 100644 --- a/generated/prisma/commonInputTypes.ts +++ b/generated/prisma/commonInputTypes.ts @@ -36,39 +36,6 @@ export type DateTimeFilter<$PrismaModel = never> = { not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string } -export type StringFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] - lt?: string | Prisma.StringFieldRefInput<$PrismaModel> - lte?: string | Prisma.StringFieldRefInput<$PrismaModel> - gt?: string | Prisma.StringFieldRefInput<$PrismaModel> - gte?: string | Prisma.StringFieldRefInput<$PrismaModel> - contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - not?: Prisma.NestedStringFilter<$PrismaModel> | string -} - -export type StringNullableFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null - lt?: string | Prisma.StringFieldRefInput<$PrismaModel> - lte?: string | Prisma.StringFieldRefInput<$PrismaModel> - gt?: string | Prisma.StringFieldRefInput<$PrismaModel> - gte?: string | Prisma.StringFieldRefInput<$PrismaModel> - contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null -} - -export type SortOrderInput = { - sort: Prisma.SortOrder - nulls?: Prisma.NullsOrder -} - export type IntWithAggregatesFilter<$PrismaModel = never> = { equals?: number | Prisma.IntFieldRefInput<$PrismaModel> in?: number[] @@ -99,40 +66,6 @@ export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedDateTimeFilter<$PrismaModel> } -export type StringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] - lt?: string | Prisma.StringFieldRefInput<$PrismaModel> - lte?: string | Prisma.StringFieldRefInput<$PrismaModel> - gt?: string | Prisma.StringFieldRefInput<$PrismaModel> - gte?: string | Prisma.StringFieldRefInput<$PrismaModel> - contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedStringFilter<$PrismaModel> - _max?: Prisma.NestedStringFilter<$PrismaModel> -} - -export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null - lt?: string | Prisma.StringFieldRefInput<$PrismaModel> - lte?: string | Prisma.StringFieldRefInput<$PrismaModel> - gt?: string | Prisma.StringFieldRefInput<$PrismaModel> - gte?: string | Prisma.StringFieldRefInput<$PrismaModel> - contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null - _count?: Prisma.NestedIntNullableFilter<$PrismaModel> - _min?: Prisma.NestedStringNullableFilter<$PrismaModel> - _max?: Prisma.NestedStringNullableFilter<$PrismaModel> -} - export type NestedIntFilter<$PrismaModel = never> = { equals?: number | Prisma.IntFieldRefInput<$PrismaModel> in?: number[] @@ -155,34 +88,6 @@ export type NestedDateTimeFilter<$PrismaModel = never> = { not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string } -export type NestedStringFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] - lt?: string | Prisma.StringFieldRefInput<$PrismaModel> - lte?: string | Prisma.StringFieldRefInput<$PrismaModel> - gt?: string | Prisma.StringFieldRefInput<$PrismaModel> - gte?: string | Prisma.StringFieldRefInput<$PrismaModel> - contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - not?: Prisma.NestedStringFilter<$PrismaModel> | string -} - -export type NestedStringNullableFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null - lt?: string | Prisma.StringFieldRefInput<$PrismaModel> - lte?: string | Prisma.StringFieldRefInput<$PrismaModel> - gt?: string | Prisma.StringFieldRefInput<$PrismaModel> - gte?: string | Prisma.StringFieldRefInput<$PrismaModel> - contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null -} - export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { equals?: number | Prisma.IntFieldRefInput<$PrismaModel> in?: number[] @@ -224,49 +129,4 @@ export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedDateTimeFilter<$PrismaModel> } -export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] - lt?: string | Prisma.StringFieldRefInput<$PrismaModel> - lte?: string | Prisma.StringFieldRefInput<$PrismaModel> - gt?: string | Prisma.StringFieldRefInput<$PrismaModel> - gte?: string | Prisma.StringFieldRefInput<$PrismaModel> - contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedStringFilter<$PrismaModel> - _max?: Prisma.NestedStringFilter<$PrismaModel> -} - -export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null - lt?: string | Prisma.StringFieldRefInput<$PrismaModel> - lte?: string | Prisma.StringFieldRefInput<$PrismaModel> - gt?: string | Prisma.StringFieldRefInput<$PrismaModel> - gte?: string | Prisma.StringFieldRefInput<$PrismaModel> - contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null - _count?: Prisma.NestedIntNullableFilter<$PrismaModel> - _min?: Prisma.NestedStringNullableFilter<$PrismaModel> - _max?: Prisma.NestedStringNullableFilter<$PrismaModel> -} - -export type NestedIntNullableFilter<$PrismaModel = never> = { - equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | Prisma.IntFieldRefInput<$PrismaModel> - lte?: number | Prisma.IntFieldRefInput<$PrismaModel> - gt?: number | Prisma.IntFieldRefInput<$PrismaModel> - gte?: number | Prisma.IntFieldRefInput<$PrismaModel> - not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null -} - diff --git a/generated/prisma/internal/class.ts b/generated/prisma/internal/class.ts index 1162790..367733f 100644 --- a/generated/prisma/internal/class.ts +++ b/generated/prisma/internal/class.ts @@ -20,7 +20,7 @@ const config: runtime.GetPrismaClientConfig = { "clientVersion": "7.4.2", "engineVersion": "94a226be1cf2967af2541cca5529f0f7ba866919", "activeProvider": "sqlite", - "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n}\n\nmodel PhotoPost {\n id Int @id @default(autoincrement())\n createdAt DateTime @default(now())\n fileName String @unique\n title String\n description String?\n}\n", + "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n}\n\nmodel PhotoPost {\n id Int @id @default(autoincrement())\n createdAt DateTime @default(now())\n}\n", "runtimeDataModel": { "models": {}, "enums": {}, @@ -32,10 +32,10 @@ const config: runtime.GetPrismaClientConfig = { } } -config.runtimeDataModel = JSON.parse("{\"models\":{\"PhotoPost\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"fileName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"PhotoPost\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") config.parameterizationSchema = { - strings: JSON.parse("[\"where\",\"PhotoPost.findUnique\",\"PhotoPost.findUniqueOrThrow\",\"orderBy\",\"cursor\",\"PhotoPost.findFirst\",\"PhotoPost.findFirstOrThrow\",\"PhotoPost.findMany\",\"data\",\"PhotoPost.createOne\",\"PhotoPost.createMany\",\"PhotoPost.createManyAndReturn\",\"PhotoPost.updateOne\",\"PhotoPost.updateMany\",\"PhotoPost.updateManyAndReturn\",\"create\",\"update\",\"PhotoPost.upsertOne\",\"PhotoPost.deleteOne\",\"PhotoPost.deleteMany\",\"having\",\"_count\",\"_avg\",\"_sum\",\"_min\",\"_max\",\"PhotoPost.groupBy\",\"PhotoPost.aggregate\",\"AND\",\"OR\",\"NOT\",\"id\",\"createdAt\",\"fileName\",\"title\",\"description\",\"equals\",\"in\",\"notIn\",\"lt\",\"lte\",\"gt\",\"gte\",\"contains\",\"startsWith\",\"endsWith\",\"not\",\"set\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"), - graph: "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" + strings: JSON.parse("[\"where\",\"PhotoPost.findUnique\",\"PhotoPost.findUniqueOrThrow\",\"orderBy\",\"cursor\",\"PhotoPost.findFirst\",\"PhotoPost.findFirstOrThrow\",\"PhotoPost.findMany\",\"data\",\"PhotoPost.createOne\",\"PhotoPost.createMany\",\"PhotoPost.createManyAndReturn\",\"PhotoPost.updateOne\",\"PhotoPost.updateMany\",\"PhotoPost.updateManyAndReturn\",\"create\",\"update\",\"PhotoPost.upsertOne\",\"PhotoPost.deleteOne\",\"PhotoPost.deleteMany\",\"having\",\"_count\",\"_avg\",\"_sum\",\"_min\",\"_max\",\"PhotoPost.groupBy\",\"PhotoPost.aggregate\",\"AND\",\"OR\",\"NOT\",\"id\",\"createdAt\",\"equals\",\"in\",\"notIn\",\"lt\",\"lte\",\"gt\",\"gte\",\"not\",\"set\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"), + graph: "KwsQBRwAACIAMB0AAAQAEB4AACIAMB8CAAAAASBAACQAIQEAAAABACABAAAAAQAgBRwAACIAMB0AAAQAEB4AACIAMB8CACMAISBAACQAIQADAAAABAAgAwAABQAwBAAAAQAgAwAAAAQAIAMAAAUAMAQAAAEAIAMAAAAEACADAAAFADAEAAABACACHwIAAAABIEAAAAABAQgAAAkAIAIfAgAAAAEgQAAAAAEBCAAACwAwAQgAAAsAMAIfAgArACEgQAAqACECAAAAAQAgCAAADgAgAh8CACsAISBAACoAIQIAAAAEACAIAAAQACACAAAABAAgCAAAEAAgAwAAAAEAIA8AAAkAIBAAAA4AIAEAAAABACABAAAABAAgBRUAACUAIBYAACYAIBcAACkAIBgAACgAIBkAACcAIAUcAAAaADAdAAAXABAeAAAaADAfAgAbACEgQAAcACEDAAAABAAgAwAAFgAwFAAAFwAgAwAAAAQAIAMAAAUAMAQAAAEAIAUcAAAaADAdAAAXABAeAAAaADAfAgAbACEgQAAcACENFQAAHgAgFgAAIQAgFwAAHgAgGAAAHgAgGQAAHgAgIQIAAAABIgIAAAAEIwIAAAAEJAIAAAABJQIAAAABJgIAAAABJwIAAAABKAIAIAAhCxUAAB4AIBgAAB8AIBkAAB8AICFAAAAAASJAAAAABCNAAAAABCRAAAAAASVAAAAAASZAAAAAASdAAAAAAShAAB0AIQsVAAAeACAYAAAfACAZAAAfACAhQAAAAAEiQAAAAAQjQAAAAAQkQAAAAAElQAAAAAEmQAAAAAEnQAAAAAEoQAAdACEIIQIAAAABIgIAAAAEIwIAAAAEJAIAAAABJQIAAAABJgIAAAABJwIAAAABKAIAHgAhCCFAAAAAASJAAAAABCNAAAAABCRAAAAAASVAAAAAASZAAAAAASdAAAAAAShAAB8AIQ0VAAAeACAWAAAhACAXAAAeACAYAAAeACAZAAAeACAhAgAAAAEiAgAAAAQjAgAAAAQkAgAAAAElAgAAAAEmAgAAAAEnAgAAAAEoAgAgACEIIQgAAAABIggAAAAEIwgAAAAEJAgAAAABJQgAAAABJggAAAABJwgAAAABKAgAIQAhBRwAACIAMB0AAAQAEB4AACIAMB8CACMAISBAACQAIQghAgAAAAEiAgAAAAQjAgAAAAQkAgAAAAElAgAAAAEmAgAAAAEnAgAAAAEoAgAeACEIIUAAAAABIkAAAAAEI0AAAAAEJEAAAAABJUAAAAABJkAAAAABJ0AAAAABKEAAHwAhAAAAAAABKUAAAAABBSkCAAAAASoCAAAAASsCAAAAASwCAAAAAS0CAAAAAQAAAAAFFQAGFgAHFwAIGAAJGQAKAAAAAAAFFQAGFgAHFwAIGAAJGQAKAQIBAgMBBQYBBgcBBwgBCQoBCgwCCw0DDA8BDRECDhIEERMBEhQBExUCGhgFGxkL" } async function decodeBase64AsWasm(wasmBase64: string): Promise { diff --git a/generated/prisma/internal/prismaNamespace.ts b/generated/prisma/internal/prismaNamespace.ts index 3fff5fb..83115cd 100644 --- a/generated/prisma/internal/prismaNamespace.ts +++ b/generated/prisma/internal/prismaNamespace.ts @@ -516,10 +516,7 @@ export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof export const PhotoPostScalarFieldEnum = { id: 'id', - createdAt: 'createdAt', - fileName: 'fileName', - title: 'title', - description: 'description' + createdAt: 'createdAt' } as const export type PhotoPostScalarFieldEnum = (typeof PhotoPostScalarFieldEnum)[keyof typeof PhotoPostScalarFieldEnum] @@ -533,14 +530,6 @@ export const SortOrder = { export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] -export const NullsOrder = { - first: 'first', - last: 'last' -} as const - -export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] - - /** * Field references @@ -561,13 +550,6 @@ export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel -/** - * Reference to a field of type 'String' - */ -export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> - - - /** * Reference to a field of type 'Float' */ diff --git a/generated/prisma/internal/prismaNamespaceBrowser.ts b/generated/prisma/internal/prismaNamespaceBrowser.ts index e564348..21cca48 100644 --- a/generated/prisma/internal/prismaNamespaceBrowser.ts +++ b/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -69,10 +69,7 @@ export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof export const PhotoPostScalarFieldEnum = { id: 'id', - createdAt: 'createdAt', - fileName: 'fileName', - title: 'title', - description: 'description' + createdAt: 'createdAt' } as const export type PhotoPostScalarFieldEnum = (typeof PhotoPostScalarFieldEnum)[keyof typeof PhotoPostScalarFieldEnum] @@ -85,11 +82,3 @@ export const SortOrder = { export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] - -export const NullsOrder = { - first: 'first', - last: 'last' -} as const - -export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] - diff --git a/generated/prisma/models/PhotoPost.ts b/generated/prisma/models/PhotoPost.ts index 2d1fc4e..70dfd0e 100644 --- a/generated/prisma/models/PhotoPost.ts +++ b/generated/prisma/models/PhotoPost.ts @@ -37,25 +37,16 @@ export type PhotoPostSumAggregateOutputType = { export type PhotoPostMinAggregateOutputType = { id: number | null createdAt: Date | null - fileName: string | null - title: string | null - description: string | null } export type PhotoPostMaxAggregateOutputType = { id: number | null createdAt: Date | null - fileName: string | null - title: string | null - description: string | null } export type PhotoPostCountAggregateOutputType = { id: number createdAt: number - fileName: number - title: number - description: number _all: number } @@ -71,25 +62,16 @@ export type PhotoPostSumAggregateInputType = { export type PhotoPostMinAggregateInputType = { id?: true createdAt?: true - fileName?: true - title?: true - description?: true } export type PhotoPostMaxAggregateInputType = { id?: true createdAt?: true - fileName?: true - title?: true - description?: true } export type PhotoPostCountAggregateInputType = { id?: true createdAt?: true - fileName?: true - title?: true - description?: true _all?: true } @@ -182,9 +164,6 @@ export type PhotoPostGroupByArgs | number createdAt?: Prisma.DateTimeFilter<"PhotoPost"> | Date | string - fileName?: Prisma.StringFilter<"PhotoPost"> | string - title?: Prisma.StringFilter<"PhotoPost"> | string - description?: Prisma.StringNullableFilter<"PhotoPost"> | string | null } export type PhotoPostOrderByWithRelationInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder - fileName?: Prisma.SortOrder - title?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder } export type PhotoPostWhereUniqueInput = Prisma.AtLeast<{ id?: number - fileName?: string AND?: Prisma.PhotoPostWhereInput | Prisma.PhotoPostWhereInput[] OR?: Prisma.PhotoPostWhereInput[] NOT?: Prisma.PhotoPostWhereInput | Prisma.PhotoPostWhereInput[] createdAt?: Prisma.DateTimeFilter<"PhotoPost"> | Date | string - title?: Prisma.StringFilter<"PhotoPost"> | string - description?: Prisma.StringNullableFilter<"PhotoPost"> | string | null -}, "id" | "fileName"> +}, "id"> export type PhotoPostOrderByWithAggregationInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder - fileName?: Prisma.SortOrder - title?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder _count?: Prisma.PhotoPostCountOrderByAggregateInput _avg?: Prisma.PhotoPostAvgOrderByAggregateInput _max?: Prisma.PhotoPostMaxOrderByAggregateInput @@ -256,70 +223,43 @@ export type PhotoPostScalarWhereWithAggregatesInput = { NOT?: Prisma.PhotoPostScalarWhereWithAggregatesInput | Prisma.PhotoPostScalarWhereWithAggregatesInput[] id?: Prisma.IntWithAggregatesFilter<"PhotoPost"> | number createdAt?: Prisma.DateTimeWithAggregatesFilter<"PhotoPost"> | Date | string - fileName?: Prisma.StringWithAggregatesFilter<"PhotoPost"> | string - title?: Prisma.StringWithAggregatesFilter<"PhotoPost"> | string - description?: Prisma.StringNullableWithAggregatesFilter<"PhotoPost"> | string | null } export type PhotoPostCreateInput = { createdAt?: Date | string - fileName: string - title: string - description?: string | null } export type PhotoPostUncheckedCreateInput = { id?: number createdAt?: Date | string - fileName: string - title: string - description?: string | null } export type PhotoPostUpdateInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - fileName?: Prisma.StringFieldUpdateOperationsInput | string - title?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null } export type PhotoPostUncheckedUpdateInput = { id?: Prisma.IntFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - fileName?: Prisma.StringFieldUpdateOperationsInput | string - title?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null } export type PhotoPostCreateManyInput = { id?: number createdAt?: Date | string - fileName: string - title: string - description?: string | null } export type PhotoPostUpdateManyMutationInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - fileName?: Prisma.StringFieldUpdateOperationsInput | string - title?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null } export type PhotoPostUncheckedUpdateManyInput = { id?: Prisma.IntFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - fileName?: Prisma.StringFieldUpdateOperationsInput | string - title?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null } export type PhotoPostCountOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder - fileName?: Prisma.SortOrder - title?: Prisma.SortOrder - description?: Prisma.SortOrder } export type PhotoPostAvgOrderByAggregateInput = { @@ -329,17 +269,11 @@ export type PhotoPostAvgOrderByAggregateInput = { export type PhotoPostMaxOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder - fileName?: Prisma.SortOrder - title?: Prisma.SortOrder - description?: Prisma.SortOrder } export type PhotoPostMinOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder - fileName?: Prisma.SortOrder - title?: Prisma.SortOrder - description?: Prisma.SortOrder } export type PhotoPostSumOrderByAggregateInput = { @@ -350,14 +284,6 @@ export type DateTimeFieldUpdateOperationsInput = { set?: Date | string } -export type StringFieldUpdateOperationsInput = { - set?: string -} - -export type NullableStringFieldUpdateOperationsInput = { - set?: string | null -} - export type IntFieldUpdateOperationsInput = { set?: number increment?: number @@ -371,36 +297,24 @@ export type IntFieldUpdateOperationsInput = { export type PhotoPostSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean - fileName?: boolean - title?: boolean - description?: boolean }, ExtArgs["result"]["photoPost"]> export type PhotoPostSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean - fileName?: boolean - title?: boolean - description?: boolean }, ExtArgs["result"]["photoPost"]> export type PhotoPostSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean - fileName?: boolean - title?: boolean - description?: boolean }, ExtArgs["result"]["photoPost"]> export type PhotoPostSelectScalar = { id?: boolean createdAt?: boolean - fileName?: boolean - title?: boolean - description?: boolean } -export type PhotoPostOmit = runtime.Types.Extensions.GetOmit<"id" | "createdAt" | "fileName" | "title" | "description", ExtArgs["result"]["photoPost"]> +export type PhotoPostOmit = runtime.Types.Extensions.GetOmit<"id" | "createdAt", ExtArgs["result"]["photoPost"]> export type $PhotoPostPayload = { name: "PhotoPost" @@ -408,9 +322,6 @@ export type $PhotoPostPayload composites: {} } @@ -836,9 +747,6 @@ export interface Prisma__PhotoPostClient readonly createdAt: Prisma.FieldRef<"PhotoPost", 'DateTime'> - readonly fileName: Prisma.FieldRef<"PhotoPost", 'String'> - readonly title: Prisma.FieldRef<"PhotoPost", 'String'> - readonly description: Prisma.FieldRef<"PhotoPost", 'String'> } @@ -1033,7 +941,7 @@ export type PhotoPostCreateArgs + data?: Prisma.XOR } /** diff --git a/prisma/migrations/20260313211532_add_fields_to_photo_stream/migration.sql b/prisma/migrations/20260313211532_add_fields_to_photo_stream/migration.sql deleted file mode 100644 index 0f36081..0000000 --- a/prisma/migrations/20260313211532_add_fields_to_photo_stream/migration.sql +++ /dev/null @@ -1,24 +0,0 @@ -/* - Warnings: - - - Added the required column `description` to the `PhotoPost` table without a default value. This is not possible if the table is not empty. - - Added the required column `filePath` to the `PhotoPost` table without a default value. This is not possible if the table is not empty. - - Added the required column `title` to the `PhotoPost` table without a default value. This is not possible if the table is not empty. - -*/ --- RedefineTables -PRAGMA defer_foreign_keys=ON; -PRAGMA foreign_keys=OFF; -CREATE TABLE "new_PhotoPost" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "filePath" TEXT NOT NULL, - "title" TEXT NOT NULL, - "description" TEXT NOT NULL -); -INSERT INTO "new_PhotoPost" ("createdAt", "id") SELECT "createdAt", "id" FROM "PhotoPost"; -DROP TABLE "PhotoPost"; -ALTER TABLE "new_PhotoPost" RENAME TO "PhotoPost"; -CREATE UNIQUE INDEX "PhotoPost_filePath_key" ON "PhotoPost"("filePath"); -PRAGMA foreign_keys=ON; -PRAGMA defer_foreign_keys=OFF; diff --git a/prisma/migrations/20260314083527_change_filepath_to_filename/migration.sql b/prisma/migrations/20260314083527_change_filepath_to_filename/migration.sql deleted file mode 100644 index 39456a6..0000000 --- a/prisma/migrations/20260314083527_change_filepath_to_filename/migration.sql +++ /dev/null @@ -1,30 +0,0 @@ -/* - Warnings: - - - You are about to drop the column `filePath` on the `PhotoPost` table. All the data in the column will be lost. - - Added the required column `fileName` to the `PhotoPost` table without a default value. This is not possible if the table is not empty. - -*/ --- RedefineTables -PRAGMA defer_foreign_keys=ON; -PRAGMA foreign_keys=OFF; -CREATE TABLE "new_PhotoPost" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "fileName" TEXT NOT NULL, - "title" TEXT NOT NULL, - "description" TEXT -); - --- The filename field is the filepath, split by '/', and it's the last part, --- so we need to modify the filePath column to fileName -ALTER TABLE "PhotoPost" ADD COLUMN "fileName" TEXT NOT NULL DEFAULT ''; -UPDATE "PhotoPost" SET "fileName" = SUBSTR("filePath", INSTR("filePath", '/') + 1); - -INSERT INTO "new_PhotoPost" ("createdAt", "description", "fileName", "id", "title") SELECT "createdAt", "description", "fileName", "id", "title" FROM "PhotoPost"; - -DROP TABLE "PhotoPost"; -ALTER TABLE "new_PhotoPost" RENAME TO "PhotoPost"; -CREATE UNIQUE INDEX "PhotoPost_fileName_key" ON "PhotoPost"("fileName"); -PRAGMA foreign_keys=ON; -PRAGMA defer_foreign_keys=OFF; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index b1c18aa..cf82cbf 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -10,8 +10,4 @@ datasource db { model PhotoPost { id Int @id @default(autoincrement()) createdAt DateTime @default(now()) - fileName String @unique - title String - description String? - }