@paperclipai/db 0.2.7 → 0.3.0-canary.1
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.
- package/LICENSE +21 -0
- package/dist/backup-lib.d.ts +15 -0
- package/dist/backup-lib.d.ts.map +1 -0
- package/dist/backup-lib.js +280 -0
- package/dist/backup-lib.js.map +1 -0
- package/dist/backup.js +88 -283
- package/dist/backup.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +4 -4
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/migrations/0024_far_beast.sql +2 -0
- package/dist/migrations/0025_nasty_salo.sql +15 -0
- package/dist/migrations/meta/0024_snapshot.json +5693 -0
- package/dist/migrations/meta/0025_snapshot.json +5849 -0
- package/dist/migrations/meta/_journal.json +14 -0
- package/dist/migrations/migrations/0024_far_beast.sql +2 -0
- package/dist/migrations/migrations/0025_nasty_salo.sql +15 -0
- package/dist/migrations/migrations/meta/0024_snapshot.json +5693 -0
- package/dist/migrations/migrations/meta/0025_snapshot.json +5849 -0
- package/dist/migrations/migrations/meta/_journal.json +14 -0
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +1 -0
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/issue_comments.d.ts.map +1 -1
- package/dist/schema/issue_comments.js +2 -0
- package/dist/schema/issue_comments.js.map +1 -1
- package/dist/schema/issue_read_states.d.ts +127 -0
- package/dist/schema/issue_read_states.d.ts.map +1 -0
- package/dist/schema/issue_read_states.js +17 -0
- package/dist/schema/issue_read_states.js.map +1 -0
- package/package.json +3 -2
|
@@ -169,6 +169,20 @@
|
|
|
169
169
|
"when": 1772139727599,
|
|
170
170
|
"tag": "0023_fair_lethal_legion",
|
|
171
171
|
"breakpoints": true
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"idx": 24,
|
|
175
|
+
"version": "7",
|
|
176
|
+
"when": 1772806603601,
|
|
177
|
+
"tag": "0024_far_beast",
|
|
178
|
+
"breakpoints": true
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"idx": 25,
|
|
182
|
+
"version": "7",
|
|
183
|
+
"when": 1772807461603,
|
|
184
|
+
"tag": "0025_nasty_salo",
|
|
185
|
+
"breakpoints": true
|
|
172
186
|
}
|
|
173
187
|
]
|
|
174
188
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
CREATE INDEX "issue_comments_company_issue_created_at_idx" ON "issue_comments" USING btree ("company_id","issue_id","created_at");--> statement-breakpoint
|
|
2
|
+
CREATE INDEX "issue_comments_company_author_issue_created_at_idx" ON "issue_comments" USING btree ("company_id","author_user_id","issue_id","created_at");
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
CREATE TABLE "issue_read_states" (
|
|
2
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
3
|
+
"company_id" uuid NOT NULL,
|
|
4
|
+
"issue_id" uuid NOT NULL,
|
|
5
|
+
"user_id" text NOT NULL,
|
|
6
|
+
"last_read_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
7
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
8
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
9
|
+
);
|
|
10
|
+
--> statement-breakpoint
|
|
11
|
+
ALTER TABLE "issue_read_states" ADD CONSTRAINT "issue_read_states_company_id_companies_id_fk" FOREIGN KEY ("company_id") REFERENCES "public"."companies"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
12
|
+
ALTER TABLE "issue_read_states" ADD CONSTRAINT "issue_read_states_issue_id_issues_id_fk" FOREIGN KEY ("issue_id") REFERENCES "public"."issues"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
13
|
+
CREATE INDEX "issue_read_states_company_issue_idx" ON "issue_read_states" USING btree ("company_id","issue_id");--> statement-breakpoint
|
|
14
|
+
CREATE INDEX "issue_read_states_company_user_idx" ON "issue_read_states" USING btree ("company_id","user_id");--> statement-breakpoint
|
|
15
|
+
CREATE UNIQUE INDEX "issue_read_states_company_issue_user_idx" ON "issue_read_states" USING btree ("company_id","issue_id","user_id");
|