Repository navigation
Expand file tree
/
Copy pathbackup.sql
More file actions
549 lines (373 loc) · 52.5 KB
/
Copy pathbackup.sql
File metadata and controls
549 lines (373 loc) · 52.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
--
-- PostgreSQL database dump
--
\restrict wWPp6patF7xagaqbUBMpqo8D0MfRM42HdGWc1vRmJWgKdHNibnOvo9lRQ0nvxZ6
-- Dumped from database version 17.2
-- Dumped by pg_dump version 18.1
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET transaction_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: public; Type: SCHEMA; Schema: -; Owner: prisma_migration
--
-- *not* creating schema, since initdb creates it
ALTER SCHEMA public OWNER TO prisma_migration;
--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: prisma_migration
--
COMMENT ON SCHEMA public IS '';
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: Repository; Type: TABLE; Schema: public; Owner: prisma_migration
--
CREATE TABLE public."Repository" (
id text NOT NULL,
"githubId" bigint NOT NULL,
owner text NOT NULL,
name text NOT NULL,
"fullName" text NOT NULL,
url text NOT NULL,
"userId" text NOT NULL,
"hookId" bigint,
"hookSecret" text,
"createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
"updatedAt" timestamp(3) without time zone NOT NULL
);
ALTER TABLE public."Repository" OWNER TO prisma_migration;
--
-- Name: account; Type: TABLE; Schema: public; Owner: prisma_migration
--
CREATE TABLE public.account (
id text NOT NULL,
"accountId" text NOT NULL,
"providerId" text NOT NULL,
"userId" text NOT NULL,
"accessToken" text,
"refreshToken" text,
"idToken" text,
"accessTokenExpiresAt" timestamp(3) without time zone,
"refreshTokenExpiresAt" timestamp(3) without time zone,
scope text,
password text,
"createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
"updatedAt" timestamp(3) without time zone NOT NULL
);
ALTER TABLE public.account OWNER TO prisma_migration;
--
-- Name: code_review; Type: TABLE; Schema: public; Owner: prisma_migration
--
CREATE TABLE public.code_review (
id text NOT NULL,
"userId" text NOT NULL,
"repositoryId" text NOT NULL,
owner text NOT NULL,
repo text NOT NULL,
"prNumber" integer NOT NULL,
"prTitle" text,
"prUrl" text,
sha text,
summary text,
files jsonb,
status text DEFAULT 'pending'::text NOT NULL,
"createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
"updatedAt" timestamp(3) without time zone NOT NULL
);
ALTER TABLE public.code_review OWNER TO prisma_migration;
--
-- Name: session; Type: TABLE; Schema: public; Owner: prisma_migration
--
CREATE TABLE public.session (
id text NOT NULL,
"expiresAt" timestamp(3) without time zone NOT NULL,
token text NOT NULL,
"createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
"updatedAt" timestamp(3) without time zone NOT NULL,
"ipAddress" text,
"userAgent" text,
"userId" text NOT NULL
);
ALTER TABLE public.session OWNER TO prisma_migration;
--
-- Name: subscription; Type: TABLE; Schema: public; Owner: prisma_migration
--
CREATE TABLE public.subscription (
id text NOT NULL,
"userId" text NOT NULL,
"polarCustomerId" text,
"polarSubscriptionId" text,
plan text DEFAULT 'free'::text NOT NULL,
status text DEFAULT 'active'::text NOT NULL,
"currentPeriodEnd" timestamp(3) without time zone,
"cancelAtPeriodEnd" boolean DEFAULT false NOT NULL,
"usageLimit" integer DEFAULT 10 NOT NULL,
"usageCount" integer DEFAULT 0 NOT NULL,
"usageResetAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
"createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
"updatedAt" timestamp(3) without time zone NOT NULL
);
ALTER TABLE public.subscription OWNER TO prisma_migration;
--
-- Name: usage; Type: TABLE; Schema: public; Owner: prisma_migration
--
CREATE TABLE public.usage (
id text NOT NULL,
"userId" text NOT NULL,
type text NOT NULL,
count integer DEFAULT 0 NOT NULL,
period text NOT NULL,
"periodStart" timestamp(3) without time zone NOT NULL,
"periodEnd" timestamp(3) without time zone NOT NULL,
"createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
"updatedAt" timestamp(3) without time zone NOT NULL
);
ALTER TABLE public.usage OWNER TO prisma_migration;
--
-- Name: user; Type: TABLE; Schema: public; Owner: prisma_migration
--
CREATE TABLE public."user" (
id text NOT NULL,
name text NOT NULL,
email text NOT NULL,
"emailVerified" boolean DEFAULT false NOT NULL,
image text,
"createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
"updatedAt" timestamp(3) without time zone NOT NULL,
"aiModel" text DEFAULT 'gemini-2.5-flash'::text NOT NULL,
"aiApiKey" text,
"aiProvider" text DEFAULT 'google'::text NOT NULL
);
ALTER TABLE public."user" OWNER TO prisma_migration;
--
-- Name: verification; Type: TABLE; Schema: public; Owner: prisma_migration
--
CREATE TABLE public.verification (
id text NOT NULL,
identifier text NOT NULL,
value text NOT NULL,
"expiresAt" timestamp(3) without time zone NOT NULL,
"createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
"updatedAt" timestamp(3) without time zone NOT NULL
);
ALTER TABLE public.verification OWNER TO prisma_migration;
--
-- Data for Name: Repository; Type: TABLE DATA; Schema: public; Owner: prisma_migration
--
COPY public."Repository" (id, "githubId", owner, name, "fullName", url, "userId", "hookId", "hookSecret", "createdAt", "updatedAt") FROM stdin;
cmnmsz65j000004lgko6iv8qi 1197411861 Ansh-dhanani claude-code-source Ansh-dhanani/claude-code-source https://github.com/Ansh-dhanani/claude-code-source 14SHFpjULnKwLiWnkPb5GEusRVegEztj 604693615 51d7a515ff6aff46d6364a1d3109bde3f501caf245f970197bb370080e887dc1 2026-04-06 06:22:09.895 2026-04-06 06:22:09.895
\.
--
-- Data for Name: account; Type: TABLE DATA; Schema: public; Owner: prisma_migration
--
COPY public.account (id, "accountId", "providerId", "userId", "accessToken", "refreshToken", "idToken", "accessTokenExpiresAt", "refreshTokenExpiresAt", scope, password, "createdAt", "updatedAt") FROM stdin;
QS3KrOJmaRYXKe0voSFWDYFbmwcq10DL 247080189 github EFpphIXdsVq7Wn0DQwKpyCCZp3y73HB6 ghu_D9myHogrVX6q2VeBZaezFguA6MZoI52kZoaE ghr_9Sgl3JDY8SXAwATpbf3ciP85iSNr5YBop5JQXpSkItBFUDddMIv0Gjq7AHZx4iACbGioXT1S8zii \N 2026-04-04 22:34:50.193 2026-10-04 14:34:50.193 \N 2026-04-04 14:33:39.404 2026-04-04 14:34:50.822
0gQ4Ih06O611VKMwE7j44AB7tu8wmNQK 189432138 github 14SHFpjULnKwLiWnkPb5GEusRVegEztj ghu_K24yYVxNQ27iEq7zCoaSGtlWtO8GqN2jXBP3 ghr_kFjpou3MvE0XKKFaSj58C142k7BT2jF2IV5iXmtrxmXM1nFJXT3z0phfe5xKzKIcK9U4Bl0cRx22 \N 2026-04-06 15:19:49.889 2026-10-06 07:19:49.889 \N 2026-04-02 07:50:57.011 2026-04-06 07:19:50.894
\.
--
-- Data for Name: code_review; Type: TABLE DATA; Schema: public; Owner: prisma_migration
--
COPY public.code_review (id, "userId", "repositoryId", owner, repo, "prNumber", "prTitle", "prUrl", sha, summary, files, status, "createdAt", "updatedAt") FROM stdin;
cmnmt0pkb000004l5ymqmmhl6 14SHFpjULnKwLiWnkPb5GEusRVegEztj cmnmsz65j000004lgko6iv8qi Ansh-dhanani claude-code-source 39 \N \N \N The PR adds a brandΓÇænew file `src/test.js` containing only a single comment (`//test`).\n\nOverall impression: the change is syntactically correct but functionally empty and lacks the conventions expected for a test file. It introduces no new behavior, yet it does raise a few style/quality concerns (missing final newline, nonΓÇæstandard naming, no export, no test framework usage).\n\nScore: **3/10** ΓÇô the file would need significant improvement before it could be considered acceptable in a production codebase. {"issues": [{"file": "src/test.js", "line": 1, "title": "Functionally empty ΓÇô no actual test", "severity": "critical", "suggestion": "Replace the stub with a meaningful test (e.g., using Jest, Mocha, or another framework). At minimum, export a test case and add assertions that verify some behavior of the code under test.", "description": "The file is named `test.js` but contains only a comment. It does not provide any test logic, assertions, or expected behavior. In a real test suite this file would never be executed, making it useless and misleading."}, {"file": "src/test.js", "line": 2, "title": "Missing newline at end of file", "severity": "warning", "suggestion": "Add a trailing newline after the comment. Most editors automatically do this when saving; configure your editor or Git hook to enforce it.", "description": "The file ends without a trailing newline. Many editors and style guides expect the last character of a text file to be a newline. This can cause warnings in CI pipelines and inconvenience developers."}, {"file": "src/test.js", "line": 1, "title": "NonΓÇæstandard file name for a test", "severity": "warning", "suggestion": "Rename the file to something clearer, e.g., `src/__tests__/example.test.js` or move it to a conventional test folder. Include the folder in your test runner configuration.", "description": "`test.js` is a generic name that could clash with real implementation files and does not convey that the file is a test. Test files are usually placed in a dedicated directory (e.g., `__tests__`, `tests/`, `spec/`) and often end with `.spec.js`, `.test.js`, or `.test.ts`."}, {"file": "src/test.js", "line": 1, "title": "No export or test runner configuration", "severity": "warning", "suggestion": "Add a proper file extension and naming convention that matches the existing test runner config, and optionally export the test function(s).", "description": "The file does not export anything, nor does it indicate which test framework is being used. If the project uses Jest, Mocha, etc., the file should be recognized by configuration (e.g., `jest` `testMatch` pattern)."}, {"file": "src/test.js", "title": "Potential linting issues", "severity": "info", "suggestion": "Add the missing newline and, if applicable, update linting rules to treat empty test files as errors.", "description": "Depending on the project's ESLint/Prettier rules, a lone comment at the end of a file without a final newline may trigger a rule violation (e.g., `eol-last` or `valid-file-extensions`)."}], "positives": ["The diff correctly uses `new file mode 100644` and records the correct hash; the operation is syntactically valid."], "suggestions": [{"file": "src/test.js", "title": "Add meaningful test content", "codeAfter": "test('example', () => {\\n expect(true).toBe(true);\\n});", "codeBefore": "//test", "description": "Even a minimal example such as `test('should do something', () => { expect(true).toBe(true); });` would make the file purposeful."}, {"file": "src/test.js", "title": "Move to conventional test location", "codeAfter": "tests/example.test.js", "codeBefore": "src/test.js", "description": "Place tests under `tests/` or `__tests__/` to keep source and test code separate."}, {"file": "src/test.js", "title": "Enforce trailing newline", "codeAfter": "test\\\\n", "codeBefore": "test", "description": "Configure your editor or add a Git hook (e.g., using `pre-commit`) that ensures every file ends with a newline."}], "overallScore": 3} completed 2026-04-06 06:23:21.707 2026-04-06 06:23:21.707
cmnmt0rf1000104l58aklu8oz 14SHFpjULnKwLiWnkPb5GEusRVegEztj cmnmsz65j000004lgko6iv8qi Ansh-dhanani claude-code-source 39 \N \N \N The change adds a single-file placeholder with minimal content (`//test`) to `src/test.js`. The file contains no functional code, ends without a newline, and does not follow typical project conventions for test files. It serves no apparent purpose in the current PR and introduces a style violation. Significant improvements are needed before this file can be considered production-ready. {"issues": [{"file": "src/test.js", "line": 1, "title": "Placeholder file with no functionality", "severity": "critical", "suggestion": "Delete the file if it was added by mistake, or implement real test code with proper assertions and export statements.", "description": "The file only contains `//test` and does not implement any test or utility logic. It adds no value to the codebase and should be removed or replaced with a meaningful implementation."}, {"file": "src/test.js", "line": 2, "title": "Missing newline at end of file (EOF)", "severity": "critical", "suggestion": "Ensure every file ends with a newline. Edit the file to `// test\\\\n` or simply `// test` followed by a newline before committing.", "description": "The file ends without a trailing newline character. Many linters and editors flag this as a style violation and some build pipelines treat it as an error."}, {"file": "src/test.js", "line": 1, "title": "Improper location and naming for a test file", "severity": "critical", "suggestion": "Rename to something like `testUtils.test.js` or move to a `__tests__/testUtils.test.js` path, and update any relevant configuration (e.g., Jest) accordingly.", "description": "`src/test.js` suggests a source module rather than a test. Tests are usually placed under a `__tests__` directory or with `.test.js` suffix to be discovered by test runners."}, {"file": "src/test.js", "line": 1, "title": "No export or entry point", "severity": "critical", "suggestion": "Add proper exports if the file provides utilities, or remove it entirely if it is unnecessary.", "description": "If the file is meant to be reusable, it should export its contents (e.g., `export const foo = ...;`). Otherwise, it remains inert and may mislead reviewers into thinking it does something."}, {"file": "src/test.js", "line": 1, "title": "Potential security / maintenance risk of placeholder files", "severity": "critical", "suggestion": "Confirm with the team whether this file is intended to stay; otherwise, delete it to avoid confusion.", "description": "Placeholder files can be accidentally referenced in production code or documentation, leading to runtime errors or security oversights."}], "positives": ["No compilation errors were introduced; the change is syntactically valid."], "suggestions": [{"file": "src/test.js", "title": "Delete the placeholder", "description": "If no actual test code was intended, remove the file entirely. This avoids noise and accidental inclusion in builds."}, {"file": "src/test.js", "title": "Implement real test content", "description": "If the goal is to add a unit test, write a proper Jasmine/Jest/Mocha test with descriptive names, assertions, and clean-up logic."}, {"file": "src/test.js", "title": "Enforce file-end-newline rule", "description": "Configure your editor or CI to automatically add a newline at EOF, or add it manually before committing."}, {"file": "src/test.js", "title": "Adopt test naming conventions", "description": "Rename the file to follow project conventions (e.g., `.test.js` suffix, `__tests__/` directory) and update any import paths."}, {"file": "src/test.js", "title": "Add module export if reusable", "description": "If the file exports utilities used elsewhere, export them explicitly."}], "overallScore": 2} completed 2026-04-06 06:23:24.109 2026-04-06 06:23:24.109
\.
--
-- Data for Name: session; Type: TABLE DATA; Schema: public; Owner: prisma_migration
--
COPY public.session (id, "expiresAt", token, "createdAt", "updatedAt", "ipAddress", "userAgent", "userId") FROM stdin;
1tr17e0AiUYXKSIXyrPfw8aBsdXwN7QH 2026-04-09 07:50:57.138 OR69tbAlWfmICrMeJ0TdsR2HnOoPwwUr 2026-04-02 07:50:57.139 2026-04-02 07:50:57.139 127.0.0.1 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 14SHFpjULnKwLiWnkPb5GEusRVegEztj
dXx1mnK7BOIGSrCLCEktxnsXNtLFEtcJ 2026-04-09 11:39:50.145 8FKcOolu7qzRCaksCYouAkuYNbSZEWO1 2026-04-02 11:39:50.146 2026-04-02 11:39:50.146 127.0.0.1 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 14SHFpjULnKwLiWnkPb5GEusRVegEztj
Ac0PY2Axhbt2Ky5pIt3nDVFqGa8JWZ4p 2026-04-11 14:34:51.038 3i1SFtesqpGIUt5HsINL6fEUKIVWiYMj 2026-04-04 14:34:51.038 2026-04-04 14:34:51.038 103.52.33.130 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 EFpphIXdsVq7Wn0DQwKpyCCZp3y73HB6
HjWqa6un0AFh8tIC32sc7tcWLcEHXLLQ 2026-04-11 15:07:43.888 RUkuJfahpXR4ar5pDRnwVt2GwEakIDjd 2026-04-04 15:07:43.888 2026-04-04 15:07:43.888 103.52.33.130 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 14SHFpjULnKwLiWnkPb5GEusRVegEztj
qFPZujqpEwSnUoZe298NuP0sSwbtsfms 2026-04-13 07:19:50.995 oe198MM06UmnsAMX6XXwV658ITXEVkTX 2026-04-06 07:19:50.995 2026-04-06 07:19:50.995 103.52.33.130 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 14SHFpjULnKwLiWnkPb5GEusRVegEztj
\.
--
-- Data for Name: subscription; Type: TABLE DATA; Schema: public; Owner: prisma_migration
--
COPY public.subscription (id, "userId", "polarCustomerId", "polarSubscriptionId", plan, status, "currentPeriodEnd", "cancelAtPeriodEnd", "usageLimit", "usageCount", "usageResetAt", "createdAt", "updatedAt") FROM stdin;
cmnheqr8x0002q8tl3bg1urol 14SHFpjULnKwLiWnkPb5GEusRVegEztj \N \N free active \N f 5 17 2026-04-30 18:30:00 2026-04-02 11:44:51.825 2026-04-06 06:23:24.427
\.
--
-- Data for Name: usage; Type: TABLE DATA; Schema: public; Owner: prisma_migration
--
COPY public.usage (id, "userId", type, count, period, "periodStart", "periodEnd", "createdAt", "updatedAt") FROM stdin;
\.
--
-- Data for Name: user; Type: TABLE DATA; Schema: public; Owner: prisma_migration
--
COPY public."user" (id, name, email, "emailVerified", image, "createdAt", "updatedAt", "aiModel", "aiApiKey", "aiProvider") FROM stdin;
EFpphIXdsVq7Wn0DQwKpyCCZp3y73HB6 SAVAN PATEL patelsavan2007@gmail.com f https://avatars.githubusercontent.com/u/247080189?v=4 2026-04-04 14:33:39.184 2026-04-04 14:33:39.184 gemini-2.5-flash \N google
14SHFpjULnKwLiWnkPb5GEusRVegEztj Ansh-Dhanani dhananiansh01@gmail.com f https://avatars.githubusercontent.com/u/189432138?v=4 2026-04-02 07:50:56.876 2026-04-05 04:42:56.192 nvidia/nemotron-3-nano-30b-a3b:free \N openrouter
\.
--
-- Data for Name: verification; Type: TABLE DATA; Schema: public; Owner: prisma_migration
--
COPY public.verification (id, identifier, value, "expiresAt", "createdAt", "updatedAt") FROM stdin;
itjqZkuzGa1hWMn4vnwohpKb3u3MDZmD xnpvJzFUEGH8aC1sDXtCQghQ83Z5DKXo {"callbackURL":"https://unentangleable-cristie-unapplaudable.ngrok-free.dev/dashboard","codeVerifier":"iwgoKt_J3q4CNuvGgbSzhgkVyzxPhG417hoqti4zEhYiUKWlIsVdml7UiGC0OnYQiwvpNIsyWegriLHoElRXyiCLE21b-reBK-721_2ifHEVnl-p0dTpQTbIcXu9mCCQ","expiresAt":1775460251553} 2026-04-06 07:24:12.082 2026-04-06 07:14:12.083 2026-04-06 07:14:12.083
\.
--
-- Name: Repository Repository_pkey; Type: CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public."Repository"
ADD CONSTRAINT "Repository_pkey" PRIMARY KEY (id);
--
-- Name: account account_pkey; Type: CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public.account
ADD CONSTRAINT account_pkey PRIMARY KEY (id);
--
-- Name: code_review code_review_pkey; Type: CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public.code_review
ADD CONSTRAINT code_review_pkey PRIMARY KEY (id);
--
-- Name: session session_pkey; Type: CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public.session
ADD CONSTRAINT session_pkey PRIMARY KEY (id);
--
-- Name: subscription subscription_pkey; Type: CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public.subscription
ADD CONSTRAINT subscription_pkey PRIMARY KEY (id);
--
-- Name: usage usage_pkey; Type: CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public.usage
ADD CONSTRAINT usage_pkey PRIMARY KEY (id);
--
-- Name: user user_pkey; Type: CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public."user"
ADD CONSTRAINT user_pkey PRIMARY KEY (id);
--
-- Name: verification verification_pkey; Type: CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public.verification
ADD CONSTRAINT verification_pkey PRIMARY KEY (id);
--
-- Name: Repository_githubId_key; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE UNIQUE INDEX "Repository_githubId_key" ON public."Repository" USING btree ("githubId");
--
-- Name: Repository_userId_idx; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE INDEX "Repository_userId_idx" ON public."Repository" USING btree ("userId");
--
-- Name: account_userId_idx; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE INDEX "account_userId_idx" ON public.account USING btree ("userId");
--
-- Name: code_review_owner_repo_prNumber_idx; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE INDEX "code_review_owner_repo_prNumber_idx" ON public.code_review USING btree (owner, repo, "prNumber");
--
-- Name: code_review_repositoryId_idx; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE INDEX "code_review_repositoryId_idx" ON public.code_review USING btree ("repositoryId");
--
-- Name: code_review_status_idx; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE INDEX code_review_status_idx ON public.code_review USING btree (status);
--
-- Name: code_review_userId_idx; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE INDEX "code_review_userId_idx" ON public.code_review USING btree ("userId");
--
-- Name: session_token_key; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE UNIQUE INDEX session_token_key ON public.session USING btree (token);
--
-- Name: session_userId_idx; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE INDEX "session_userId_idx" ON public.session USING btree ("userId");
--
-- Name: subscription_polarCustomerId_idx; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE INDEX "subscription_polarCustomerId_idx" ON public.subscription USING btree ("polarCustomerId");
--
-- Name: subscription_polarCustomerId_key; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE UNIQUE INDEX "subscription_polarCustomerId_key" ON public.subscription USING btree ("polarCustomerId");
--
-- Name: subscription_polarSubscriptionId_key; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE UNIQUE INDEX "subscription_polarSubscriptionId_key" ON public.subscription USING btree ("polarSubscriptionId");
--
-- Name: subscription_status_idx; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE INDEX subscription_status_idx ON public.subscription USING btree (status);
--
-- Name: subscription_userId_idx; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE INDEX "subscription_userId_idx" ON public.subscription USING btree ("userId");
--
-- Name: subscription_userId_key; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE UNIQUE INDEX "subscription_userId_key" ON public.subscription USING btree ("userId");
--
-- Name: usage_userId_period_idx; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE INDEX "usage_userId_period_idx" ON public.usage USING btree ("userId", period);
--
-- Name: usage_userId_type_period_key; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE UNIQUE INDEX "usage_userId_type_period_key" ON public.usage USING btree ("userId", type, period);
--
-- Name: user_email_key; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE UNIQUE INDEX user_email_key ON public."user" USING btree (email);
--
-- Name: verification_identifier_idx; Type: INDEX; Schema: public; Owner: prisma_migration
--
CREATE INDEX verification_identifier_idx ON public.verification USING btree (identifier);
--
-- Name: Repository Repository_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public."Repository"
ADD CONSTRAINT "Repository_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: account account_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public.account
ADD CONSTRAINT "account_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: code_review code_review_repositoryId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public.code_review
ADD CONSTRAINT "code_review_repositoryId_fkey" FOREIGN KEY ("repositoryId") REFERENCES public."Repository"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: code_review code_review_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public.code_review
ADD CONSTRAINT "code_review_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: session session_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public.session
ADD CONSTRAINT "session_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: subscription subscription_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public.subscription
ADD CONSTRAINT "subscription_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: usage usage_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: prisma_migration
--
ALTER TABLE ONLY public.usage
ADD CONSTRAINT "usage_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: prisma_migration
--
REVOKE USAGE ON SCHEMA public FROM PUBLIC;
--
-- PostgreSQL database dump complete
--
\unrestrict wWPp6patF7xagaqbUBMpqo8D0MfRM42HdGWc1vRmJWgKdHNibnOvo9lRQ0nvxZ6