@danielcok17/prisma-db 1.0.5 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/package.json +3 -3
  2. package/prisma/app.prisma +32 -0
  3. package/prisma/generated/app/default.js +1 -1
  4. package/prisma/generated/app/edge.js +29 -10
  5. package/prisma/generated/app/index-browser.js +24 -5
  6. package/prisma/generated/app/index.d.ts +4795 -1404
  7. package/prisma/generated/app/index.js +29 -10
  8. package/prisma/generated/app/libquery_engine-darwin-arm64.dylib.node +0 -0
  9. package/prisma/generated/app/package.json +37 -4
  10. package/prisma/generated/app/query_engine_bg.js +2 -0
  11. package/prisma/generated/app/query_engine_bg.wasm +0 -0
  12. package/prisma/generated/app/runtime/edge-esm.js +16 -16
  13. package/prisma/generated/app/runtime/edge.js +16 -16
  14. package/prisma/generated/app/runtime/library.d.ts +1 -0
  15. package/prisma/generated/app/runtime/library.js +45 -45
  16. package/prisma/generated/app/runtime/react-native.js +28 -28
  17. package/prisma/generated/app/runtime/wasm-compiler-edge.js +27 -26
  18. package/prisma/generated/app/runtime/wasm-engine-edge.js +18 -17
  19. package/prisma/generated/app/schema.prisma +60 -28
  20. package/prisma/generated/app/wasm-edge-light-loader.mjs +4 -0
  21. package/prisma/generated/app/wasm-worker-loader.mjs +4 -0
  22. package/prisma/generated/app/wasm.d.ts +1 -1
  23. package/prisma/generated/app/wasm.js +139 -99
  24. package/prisma/generated/law/default.js +1 -1
  25. package/prisma/generated/law/edge.js +6 -6
  26. package/prisma/generated/law/index-browser.js +4 -4
  27. package/prisma/generated/law/index.d.ts +6 -2
  28. package/prisma/generated/law/index.js +6 -6
  29. package/prisma/generated/law/libquery_engine-darwin-arm64.dylib.node +0 -0
  30. package/prisma/generated/law/package.json +36 -3
  31. package/prisma/generated/law/query_engine_bg.js +2 -0
  32. package/prisma/generated/law/query_engine_bg.wasm +0 -0
  33. package/prisma/generated/law/runtime/edge-esm.js +16 -16
  34. package/prisma/generated/law/runtime/edge.js +16 -16
  35. package/prisma/generated/law/runtime/library.d.ts +1 -0
  36. package/prisma/generated/law/runtime/library.js +45 -45
  37. package/prisma/generated/law/runtime/react-native.js +28 -28
  38. package/prisma/generated/law/runtime/wasm-compiler-edge.js +27 -26
  39. package/prisma/generated/law/runtime/wasm-engine-edge.js +18 -17
  40. package/prisma/generated/law/wasm-edge-light-loader.mjs +4 -0
  41. package/prisma/generated/law/wasm-worker-loader.mjs +4 -0
  42. package/prisma/generated/law/wasm.d.ts +1 -1
  43. package/prisma/generated/law/wasm.js +106 -85
  44. package/prisma/migrations/20251009213916_add_email_authentication/migration.sql +54 -0
@@ -0,0 +1,4 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!!
3
+ /* eslint-disable */
4
+ export default import('./query_engine_bg.wasm?module')
@@ -0,0 +1,4 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!!
3
+ /* eslint-disable */
4
+ export default import('./query_engine_bg.wasm')
@@ -1 +1 @@
1
- export * from "./index"
1
+ export * from "./default"
@@ -5,13 +5,28 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
 
7
7
  const {
8
+ PrismaClientKnownRequestError,
9
+ PrismaClientUnknownRequestError,
10
+ PrismaClientRustPanicError,
11
+ PrismaClientInitializationError,
12
+ PrismaClientValidationError,
13
+ getPrismaClient,
14
+ sqltag,
15
+ empty,
16
+ join,
17
+ raw,
18
+ skip,
8
19
  Decimal,
20
+ Debug,
9
21
  objectEnumValues,
10
22
  makeStrictEnum,
23
+ Extensions,
24
+ warnOnce,
25
+ defineDmmfProperty,
11
26
  Public,
12
27
  getRuntime,
13
- skip
14
- } = require('./runtime/index-browser.js')
28
+ createParam,
29
+ } = require('./runtime/wasm-engine-edge.js')
15
30
 
16
31
 
17
32
  const Prisma = {}
@@ -20,79 +35,35 @@ exports.Prisma = Prisma
20
35
  exports.$Enums = {}
21
36
 
22
37
  /**
23
- * Prisma Client JS version: 6.15.0
24
- * Query Engine version: 85179d7826409ee107a6ba334b5e305ae3fba9fb
38
+ * Prisma Client JS version: 6.17.0
39
+ * Query Engine version: c0aafc03b8ef6cdced8654b9a817999e02457d6a
25
40
  */
26
41
  Prisma.prismaVersion = {
27
- client: "6.15.0",
28
- engine: "85179d7826409ee107a6ba334b5e305ae3fba9fb"
42
+ client: "6.17.0",
43
+ engine: "c0aafc03b8ef6cdced8654b9a817999e02457d6a"
29
44
  }
30
45
 
31
- Prisma.PrismaClientKnownRequestError = () => {
32
- const runtimeName = getRuntime().prettyName;
33
- throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
34
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
35
- )};
36
- Prisma.PrismaClientUnknownRequestError = () => {
37
- const runtimeName = getRuntime().prettyName;
38
- throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
39
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
40
- )}
41
- Prisma.PrismaClientRustPanicError = () => {
42
- const runtimeName = getRuntime().prettyName;
43
- throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
44
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
45
- )}
46
- Prisma.PrismaClientInitializationError = () => {
47
- const runtimeName = getRuntime().prettyName;
48
- throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
49
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
50
- )}
51
- Prisma.PrismaClientValidationError = () => {
52
- const runtimeName = getRuntime().prettyName;
53
- throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
54
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
55
- )}
46
+ Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError;
47
+ Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError
48
+ Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError
49
+ Prisma.PrismaClientInitializationError = PrismaClientInitializationError
50
+ Prisma.PrismaClientValidationError = PrismaClientValidationError
56
51
  Prisma.Decimal = Decimal
57
52
 
58
53
  /**
59
54
  * Re-export of sql-template-tag
60
55
  */
61
- Prisma.sql = () => {
62
- const runtimeName = getRuntime().prettyName;
63
- throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
64
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
65
- )}
66
- Prisma.empty = () => {
67
- const runtimeName = getRuntime().prettyName;
68
- throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
69
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
70
- )}
71
- Prisma.join = () => {
72
- const runtimeName = getRuntime().prettyName;
73
- throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
74
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
75
- )}
76
- Prisma.raw = () => {
77
- const runtimeName = getRuntime().prettyName;
78
- throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
79
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
80
- )}
56
+ Prisma.sql = sqltag
57
+ Prisma.empty = empty
58
+ Prisma.join = join
59
+ Prisma.raw = raw
81
60
  Prisma.validator = Public.validator
82
61
 
83
62
  /**
84
63
  * Extensions
85
64
  */
86
- Prisma.getExtensionContext = () => {
87
- const runtimeName = getRuntime().prettyName;
88
- throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
89
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
90
- )}
91
- Prisma.defineExtension = () => {
92
- const runtimeName = getRuntime().prettyName;
93
- throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
94
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
95
- )}
65
+ Prisma.getExtensionContext = Extensions.getExtensionContext
66
+ Prisma.defineExtension = Extensions.defineExtension
96
67
 
97
68
  /**
98
69
  * Shorthand utilities for JSON filtering
@@ -109,10 +80,11 @@ Prisma.NullTypes = {
109
80
 
110
81
 
111
82
 
83
+
84
+
112
85
  /**
113
86
  * Enums
114
87
  */
115
-
116
88
  exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
117
89
  ReadUncommitted: 'ReadUncommitted',
118
90
  ReadCommitted: 'ReadCommitted',
@@ -205,34 +177,83 @@ exports.Prisma.ModelName = {
205
177
  LawAttachment: 'LawAttachment',
206
178
  VersionParagraph: 'VersionParagraph'
207
179
  };
208
-
209
180
  /**
210
- * This is a stub Prisma Client that will error at runtime if called.
181
+ * Create the Client
211
182
  */
212
- class PrismaClient {
213
- constructor() {
214
- return new Proxy(this, {
215
- get(target, prop) {
216
- let message
217
- const runtime = getRuntime()
218
- if (runtime.isEdge) {
219
- message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
220
- - Use Prisma Accelerate: https://pris.ly/d/accelerate
221
- - Use Driver Adapters: https://pris.ly/d/driver-adapters
222
- `;
223
- } else {
224
- message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
225
- }
226
-
227
- message += `
228
- If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
229
-
230
- throw new Error(message)
183
+ const config = {
184
+ "generator": {
185
+ "name": "client",
186
+ "provider": {
187
+ "fromEnvVar": null,
188
+ "value": "prisma-client-js"
189
+ },
190
+ "output": {
191
+ "value": "/Users/danielcok/Solty/AI Solutions/legal-ai-prisma-db/prisma/generated/law",
192
+ "fromEnvVar": null
193
+ },
194
+ "config": {
195
+ "engineType": "library"
196
+ },
197
+ "binaryTargets": [
198
+ {
199
+ "fromEnvVar": null,
200
+ "value": "darwin-arm64",
201
+ "native": true
231
202
  }
232
- })
203
+ ],
204
+ "previewFeatures": [],
205
+ "sourceFilePath": "/Users/danielcok/Solty/AI Solutions/legal-ai-prisma-db/prisma/law.prisma",
206
+ "isCustomOutput": true
207
+ },
208
+ "relativeEnvPaths": {
209
+ "rootEnvPath": null,
210
+ "schemaEnvPath": "../../../.env"
211
+ },
212
+ "relativePath": "../..",
213
+ "clientVersion": "6.17.0",
214
+ "engineVersion": "c0aafc03b8ef6cdced8654b9a817999e02457d6a",
215
+ "datasourceNames": [
216
+ "db"
217
+ ],
218
+ "activeProvider": "postgresql",
219
+ "postinstall": false,
220
+ "inlineDatasources": {
221
+ "db": {
222
+ "url": {
223
+ "fromEnvVar": "POSTGRES_PRISMA_URL_LAW",
224
+ "value": null
225
+ }
226
+ }
227
+ },
228
+ "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"./generated/law\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"POSTGRES_PRISMA_URL_LAW\")\n directUrl = env(\"POSTGRES_URL_NON_POOLING_LAW\")\n schemas = [\"public\"]\n}\n\n/// Existing public tables (read-only recommended). Validate nullability via introspection.\nmodel LawVersion {\n id String @id\n lawId String? @map(\"lawid\")\n lawName String? @map(\"lawname\")\n versionNumber String? @map(\"versionnumber\")\n lawUrl String? @map(\"lawurl\")\n isLawVersionEffective Boolean? @map(\"islawversioneffective\")\n isAmendment Boolean? @map(\"isamendment\")\n fullLawId String? @map(\"fulllawid\")\n approvalDate DateTime? @map(\"approvaldate\")\n publicationDate DateTime? @map(\"publicationdate\")\n effectiveFrom DateTime? @map(\"effectivefrom\")\n effectiveUntil DateTime? @map(\"effectiveuntil\")\n author String?\n fullLawHtml String? @map(\"fulllawhtml\")\n fullLaw String? @map(\"fulllaw\")\n legalAreas Json? @map(\"legalareas\")\n publishedIn Json? @map(\"publishedin\")\n relationships Json? @map(\"relationships\")\n\n attachments LawAttachment[]\n paragraphs VersionParagraph[]\n\n @@map(\"law_versions\")\n @@schema(\"public\")\n}\n\nmodel LawAttachment {\n id Int @id\n name String?\n attachmentId String? @map(\"attachmentid\")\n content String?\n lawVersionId String @map(\"lawversionid\")\n\n lawVersion LawVersion @relation(fields: [lawVersionId], references: [id])\n\n @@map(\"law_attachments\")\n @@schema(\"public\")\n}\n\nmodel VersionParagraph {\n id Int @id\n paragraphId String? @map(\"paragraph_id\")\n versionId String @map(\"version_id\")\n sequenceNumber Int? @map(\"sequence_number\")\n text String?\n fullText String? @map(\"full_text\")\n fullTextWithCitations String? @map(\"full_text_with_citations\")\n embedding Json?\n partId String? @map(\"part_id\")\n partName String? @map(\"part_name\")\n chapterId String? @map(\"chapter_id\")\n chapterName String? @map(\"chapter_name\")\n divisionId String? @map(\"division_id\")\n divisionName String? @map(\"division_name\")\n sectionId String? @map(\"section_id\")\n sectionName String? @map(\"section_name\")\n paragraphPath String? @map(\"paragraph_path\")\n paragraphGroupName String? @map(\"paragraph_group_name\")\n isAmendment Boolean? @map(\"is_amendment\")\n validFrom DateTime? @map(\"valid_from\")\n validTo DateTime? @map(\"valid_to\")\n\n lawVersion LawVersion @relation(fields: [versionId], references: [id])\n\n @@map(\"version_paragraphs\")\n @@schema(\"public\")\n}\n",
229
+ "inlineSchemaHash": "6f22eba3fd4358c762e273f641c17cc5429a0f72af01ecce52b31cd52befa8cf",
230
+ "copyEngine": true
231
+ }
232
+ config.dirname = '/'
233
+
234
+ config.runtimeDataModel = JSON.parse("{\"models\":{\"LawVersion\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lawId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"lawid\"},{\"name\":\"lawName\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"lawname\"},{\"name\":\"versionNumber\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"versionnumber\"},{\"name\":\"lawUrl\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"lawurl\"},{\"name\":\"isLawVersionEffective\",\"kind\":\"scalar\",\"type\":\"Boolean\",\"dbName\":\"islawversioneffective\"},{\"name\":\"isAmendment\",\"kind\":\"scalar\",\"type\":\"Boolean\",\"dbName\":\"isamendment\"},{\"name\":\"fullLawId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"fulllawid\"},{\"name\":\"approvalDate\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"approvaldate\"},{\"name\":\"publicationDate\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"publicationdate\"},{\"name\":\"effectiveFrom\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"effectivefrom\"},{\"name\":\"effectiveUntil\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"effectiveuntil\"},{\"name\":\"author\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fullLawHtml\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"fulllawhtml\"},{\"name\":\"fullLaw\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"fulllaw\"},{\"name\":\"legalAreas\",\"kind\":\"scalar\",\"type\":\"Json\",\"dbName\":\"legalareas\"},{\"name\":\"publishedIn\",\"kind\":\"scalar\",\"type\":\"Json\",\"dbName\":\"publishedin\"},{\"name\":\"relationships\",\"kind\":\"scalar\",\"type\":\"Json\",\"dbName\":\"relationships\"},{\"name\":\"attachments\",\"kind\":\"object\",\"type\":\"LawAttachment\",\"relationName\":\"LawAttachmentToLawVersion\"},{\"name\":\"paragraphs\",\"kind\":\"object\",\"type\":\"VersionParagraph\",\"relationName\":\"LawVersionToVersionParagraph\"}],\"dbName\":\"law_versions\"},\"LawAttachment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachmentId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"attachmentid\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lawVersionId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"lawversionid\"},{\"name\":\"lawVersion\",\"kind\":\"object\",\"type\":\"LawVersion\",\"relationName\":\"LawAttachmentToLawVersion\"}],\"dbName\":\"law_attachments\"},\"VersionParagraph\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"paragraphId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"paragraph_id\"},{\"name\":\"versionId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"version_id\"},{\"name\":\"sequenceNumber\",\"kind\":\"scalar\",\"type\":\"Int\",\"dbName\":\"sequence_number\"},{\"name\":\"text\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fullText\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"full_text\"},{\"name\":\"fullTextWithCitations\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"full_text_with_citations\"},{\"name\":\"embedding\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"partId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"part_id\"},{\"name\":\"partName\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"part_name\"},{\"name\":\"chapterId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"chapter_id\"},{\"name\":\"chapterName\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"chapter_name\"},{\"name\":\"divisionId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"division_id\"},{\"name\":\"divisionName\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"division_name\"},{\"name\":\"sectionId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"section_id\"},{\"name\":\"sectionName\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"section_name\"},{\"name\":\"paragraphPath\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"paragraph_path\"},{\"name\":\"paragraphGroupName\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"paragraph_group_name\"},{\"name\":\"isAmendment\",\"kind\":\"scalar\",\"type\":\"Boolean\",\"dbName\":\"is_amendment\"},{\"name\":\"validFrom\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"valid_from\"},{\"name\":\"validTo\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"valid_to\"},{\"name\":\"lawVersion\",\"kind\":\"object\",\"type\":\"LawVersion\",\"relationName\":\"LawVersionToVersionParagraph\"}],\"dbName\":\"version_paragraphs\"}},\"enums\":{},\"types\":{}}")
235
+ defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
236
+ config.engineWasm = {
237
+ getRuntime: async () => require('./query_engine_bg.js'),
238
+ getQueryEngineWasmModule: async () => {
239
+ const loader = (await import('#wasm-engine-loader')).default
240
+ const engine = (await loader).default
241
+ return engine
233
242
  }
234
243
  }
244
+ config.compilerWasm = undefined
235
245
 
236
- exports.PrismaClient = PrismaClient
246
+ config.injectableEdgeEnv = () => ({
247
+ parsed: {
248
+ POSTGRES_PRISMA_URL_LAW: typeof globalThis !== 'undefined' && globalThis['POSTGRES_PRISMA_URL_LAW'] || typeof process !== 'undefined' && process.env && process.env.POSTGRES_PRISMA_URL_LAW || undefined
249
+ }
250
+ })
251
+
252
+ if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) {
253
+ Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined)
254
+ }
237
255
 
256
+ const PrismaClient = getPrismaClient(config)
257
+ exports.PrismaClient = PrismaClient
238
258
  Object.assign(exports, Prisma)
259
+
@@ -0,0 +1,54 @@
1
+ -- AlterTable
2
+ ALTER TABLE "User" ADD COLUMN "password" TEXT;
3
+
4
+ -- CreateTable
5
+ CREATE TABLE "VerificationToken" (
6
+ "id" TEXT NOT NULL,
7
+ "userId" TEXT NOT NULL,
8
+ "token" TEXT NOT NULL,
9
+ "expires" TIMESTAMP(3) NOT NULL,
10
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
11
+
12
+ CONSTRAINT "VerificationToken_pkey" PRIMARY KEY ("id")
13
+ );
14
+
15
+ -- CreateTable
16
+ CREATE TABLE "PasswordResetToken" (
17
+ "id" TEXT NOT NULL,
18
+ "userId" TEXT NOT NULL,
19
+ "token" TEXT NOT NULL,
20
+ "expires" TIMESTAMP(3) NOT NULL,
21
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
22
+
23
+ CONSTRAINT "PasswordResetToken_pkey" PRIMARY KEY ("id")
24
+ );
25
+
26
+ -- CreateIndex
27
+ CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"("token");
28
+
29
+ -- CreateIndex
30
+ CREATE INDEX "VerificationToken_token_idx" ON "VerificationToken"("token");
31
+
32
+ -- CreateIndex
33
+ CREATE INDEX "VerificationToken_userId_idx" ON "VerificationToken"("userId");
34
+
35
+ -- CreateIndex
36
+ CREATE INDEX "VerificationToken_expires_idx" ON "VerificationToken"("expires");
37
+
38
+ -- CreateIndex
39
+ CREATE UNIQUE INDEX "PasswordResetToken_token_key" ON "PasswordResetToken"("token");
40
+
41
+ -- CreateIndex
42
+ CREATE INDEX "PasswordResetToken_token_idx" ON "PasswordResetToken"("token");
43
+
44
+ -- CreateIndex
45
+ CREATE INDEX "PasswordResetToken_userId_idx" ON "PasswordResetToken"("userId");
46
+
47
+ -- CreateIndex
48
+ CREATE INDEX "PasswordResetToken_expires_idx" ON "PasswordResetToken"("expires");
49
+
50
+ -- AddForeignKey
51
+ ALTER TABLE "VerificationToken" ADD CONSTRAINT "VerificationToken_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
52
+
53
+ -- AddForeignKey
54
+ ALTER TABLE "PasswordResetToken" ADD CONSTRAINT "PasswordResetToken_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;