@byline/cli 1.8.2 → 1.9.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/package.json
CHANGED
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
CREATE TABLE "byline_admin_permissions" (
|
|
2
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
3
|
-
"vid" integer DEFAULT 1 NOT NULL,
|
|
4
|
-
"admin_role_id" uuid NOT NULL,
|
|
5
|
-
"ability" varchar(128) NOT NULL,
|
|
6
|
-
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
7
|
-
"updated_at" timestamp DEFAULT now() NOT NULL,
|
|
8
|
-
CONSTRAINT "uq_byline_admin_permissions_role_ability" UNIQUE("admin_role_id","ability")
|
|
9
|
-
);
|
|
10
|
-
--> statement-breakpoint
|
|
11
|
-
CREATE TABLE "byline_admin_refresh_tokens" (
|
|
12
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
13
|
-
"admin_user_id" uuid NOT NULL,
|
|
14
|
-
"token_hash" varchar(64) NOT NULL,
|
|
15
|
-
"issued_at" timestamp (6) with time zone DEFAULT now() NOT NULL,
|
|
16
|
-
"expires_at" timestamp (6) with time zone NOT NULL,
|
|
17
|
-
"revoked_at" timestamp (6) with time zone,
|
|
18
|
-
"rotated_to_id" uuid,
|
|
19
|
-
"last_used_at" timestamp (6) with time zone,
|
|
20
|
-
"user_agent" varchar(512),
|
|
21
|
-
"ip" varchar(45),
|
|
22
|
-
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
23
|
-
"updated_at" timestamp DEFAULT now() NOT NULL,
|
|
24
|
-
CONSTRAINT "byline_admin_refresh_tokens_token_hash_unique" UNIQUE("token_hash")
|
|
25
|
-
);
|
|
26
|
-
--> statement-breakpoint
|
|
27
|
-
CREATE TABLE "byline_admin_role_admin_user" (
|
|
28
|
-
"admin_role_id" uuid NOT NULL,
|
|
29
|
-
"admin_user_id" uuid NOT NULL,
|
|
30
|
-
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
31
|
-
CONSTRAINT "byline_admin_role_admin_user_admin_role_id_admin_user_id_pk" PRIMARY KEY("admin_role_id","admin_user_id")
|
|
32
|
-
);
|
|
33
|
-
--> statement-breakpoint
|
|
34
|
-
CREATE TABLE "byline_admin_roles" (
|
|
35
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
36
|
-
"vid" integer DEFAULT 1 NOT NULL,
|
|
37
|
-
"name" varchar(128) NOT NULL,
|
|
38
|
-
"machine_name" varchar(128) NOT NULL,
|
|
39
|
-
"description" text,
|
|
40
|
-
"order" integer DEFAULT 0 NOT NULL,
|
|
41
|
-
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
42
|
-
"updated_at" timestamp DEFAULT now() NOT NULL,
|
|
43
|
-
CONSTRAINT "byline_admin_roles_machine_name_unique" UNIQUE("machine_name")
|
|
44
|
-
);
|
|
45
|
-
--> statement-breakpoint
|
|
46
|
-
CREATE TABLE "byline_admin_users" (
|
|
47
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
48
|
-
"vid" integer DEFAULT 1 NOT NULL,
|
|
49
|
-
"given_name" varchar(100),
|
|
50
|
-
"family_name" varchar(100),
|
|
51
|
-
"username" varchar(64),
|
|
52
|
-
"email" varchar(254) NOT NULL,
|
|
53
|
-
"password" varchar(255) NOT NULL,
|
|
54
|
-
"remember_me" boolean DEFAULT false NOT NULL,
|
|
55
|
-
"last_login" timestamp (6) with time zone,
|
|
56
|
-
"last_login_ip" varchar(45),
|
|
57
|
-
"failed_login_attempts" integer DEFAULT 0 NOT NULL,
|
|
58
|
-
"is_super_admin" boolean DEFAULT false NOT NULL,
|
|
59
|
-
"is_enabled" boolean DEFAULT false NOT NULL,
|
|
60
|
-
"is_email_verified" boolean DEFAULT false NOT NULL,
|
|
61
|
-
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
62
|
-
"updated_at" timestamp DEFAULT now() NOT NULL,
|
|
63
|
-
CONSTRAINT "byline_admin_users_username_unique" UNIQUE("username"),
|
|
64
|
-
CONSTRAINT "byline_admin_users_email_unique" UNIQUE("email")
|
|
65
|
-
);
|
|
66
|
-
--> statement-breakpoint
|
|
67
|
-
CREATE TABLE "byline_store_boolean" (
|
|
68
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
69
|
-
"document_version_id" uuid NOT NULL,
|
|
70
|
-
"collection_id" uuid NOT NULL,
|
|
71
|
-
"field_path" varchar(500) NOT NULL,
|
|
72
|
-
"field_name" varchar(255) NOT NULL,
|
|
73
|
-
"locale" varchar(10) DEFAULT 'default' NOT NULL,
|
|
74
|
-
"parent_path" varchar(500),
|
|
75
|
-
"created_at" timestamp DEFAULT now(),
|
|
76
|
-
"updated_at" timestamp DEFAULT now(),
|
|
77
|
-
"value" boolean NOT NULL,
|
|
78
|
-
CONSTRAINT "unique_boolean_field" UNIQUE("document_version_id","field_path","locale")
|
|
79
|
-
);
|
|
80
|
-
--> statement-breakpoint
|
|
81
|
-
CREATE TABLE "byline_collections" (
|
|
82
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
83
|
-
"path" varchar(255) NOT NULL,
|
|
84
|
-
"singular" text NOT NULL,
|
|
85
|
-
"plural" text NOT NULL,
|
|
86
|
-
"config" jsonb NOT NULL,
|
|
87
|
-
"version" integer DEFAULT 1 NOT NULL,
|
|
88
|
-
"schema_hash" varchar(64),
|
|
89
|
-
"created_at" timestamp DEFAULT now(),
|
|
90
|
-
"updated_at" timestamp DEFAULT now(),
|
|
91
|
-
CONSTRAINT "byline_collections_path_unique" UNIQUE("path")
|
|
92
|
-
);
|
|
93
|
-
--> statement-breakpoint
|
|
94
|
-
CREATE TABLE "byline_store_datetime" (
|
|
95
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
96
|
-
"document_version_id" uuid NOT NULL,
|
|
97
|
-
"collection_id" uuid NOT NULL,
|
|
98
|
-
"field_path" varchar(500) NOT NULL,
|
|
99
|
-
"field_name" varchar(255) NOT NULL,
|
|
100
|
-
"locale" varchar(10) DEFAULT 'default' NOT NULL,
|
|
101
|
-
"parent_path" varchar(500),
|
|
102
|
-
"created_at" timestamp DEFAULT now(),
|
|
103
|
-
"updated_at" timestamp DEFAULT now(),
|
|
104
|
-
"date_type" varchar(20) NOT NULL,
|
|
105
|
-
"value_date" date,
|
|
106
|
-
"value_time" time,
|
|
107
|
-
"value_timestamp_tz" timestamp with time zone,
|
|
108
|
-
CONSTRAINT "unique_datetime_field" UNIQUE("document_version_id","field_path","locale")
|
|
109
|
-
);
|
|
110
|
-
--> statement-breakpoint
|
|
111
|
-
CREATE TABLE "byline_document_relationships" (
|
|
112
|
-
"parent_document_id" uuid NOT NULL,
|
|
113
|
-
"child_document_id" uuid NOT NULL,
|
|
114
|
-
"created_at" timestamp DEFAULT now(),
|
|
115
|
-
CONSTRAINT "byline_document_relationships_parent_document_id_child_document_id_unique" UNIQUE("parent_document_id","child_document_id")
|
|
116
|
-
);
|
|
117
|
-
--> statement-breakpoint
|
|
118
|
-
CREATE TABLE "byline_document_versions" (
|
|
119
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
120
|
-
"document_id" uuid NOT NULL,
|
|
121
|
-
"collection_id" uuid NOT NULL,
|
|
122
|
-
"collection_version" integer NOT NULL,
|
|
123
|
-
"path" varchar(255) NOT NULL,
|
|
124
|
-
"doc" jsonb,
|
|
125
|
-
"event_type" varchar(20) DEFAULT 'create' NOT NULL,
|
|
126
|
-
"status" varchar(50) DEFAULT 'draft',
|
|
127
|
-
"is_deleted" boolean DEFAULT false,
|
|
128
|
-
"created_at" timestamp DEFAULT now(),
|
|
129
|
-
"updated_at" timestamp DEFAULT now(),
|
|
130
|
-
"created_by" uuid,
|
|
131
|
-
"change_summary" text
|
|
132
|
-
);
|
|
133
|
-
--> statement-breakpoint
|
|
134
|
-
CREATE TABLE "byline_documents" (
|
|
135
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
136
|
-
"collection_id" uuid NOT NULL,
|
|
137
|
-
"created_at" timestamp DEFAULT now(),
|
|
138
|
-
"updated_at" timestamp DEFAULT now()
|
|
139
|
-
);
|
|
140
|
-
--> statement-breakpoint
|
|
141
|
-
CREATE TABLE "byline_store_file" (
|
|
142
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
143
|
-
"document_version_id" uuid NOT NULL,
|
|
144
|
-
"collection_id" uuid NOT NULL,
|
|
145
|
-
"field_path" varchar(500) NOT NULL,
|
|
146
|
-
"field_name" varchar(255) NOT NULL,
|
|
147
|
-
"locale" varchar(10) DEFAULT 'default' NOT NULL,
|
|
148
|
-
"parent_path" varchar(500),
|
|
149
|
-
"created_at" timestamp DEFAULT now(),
|
|
150
|
-
"updated_at" timestamp DEFAULT now(),
|
|
151
|
-
"file_id" uuid NOT NULL,
|
|
152
|
-
"filename" varchar(255) NOT NULL,
|
|
153
|
-
"original_filename" varchar(255) NOT NULL,
|
|
154
|
-
"mime_type" varchar(100) NOT NULL,
|
|
155
|
-
"file_size" bigint NOT NULL,
|
|
156
|
-
"file_hash" varchar(64),
|
|
157
|
-
"storage_provider" varchar(50) NOT NULL,
|
|
158
|
-
"storage_path" text NOT NULL,
|
|
159
|
-
"storage_url" text,
|
|
160
|
-
"image_width" integer,
|
|
161
|
-
"image_height" integer,
|
|
162
|
-
"image_format" varchar(20),
|
|
163
|
-
"processing_status" varchar(20) DEFAULT 'pending',
|
|
164
|
-
"thumbnail_generated" boolean DEFAULT false,
|
|
165
|
-
CONSTRAINT "unique_file_field" UNIQUE("document_version_id","field_path","locale")
|
|
166
|
-
);
|
|
167
|
-
--> statement-breakpoint
|
|
168
|
-
CREATE TABLE "byline_store_json" (
|
|
169
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
170
|
-
"document_version_id" uuid NOT NULL,
|
|
171
|
-
"collection_id" uuid NOT NULL,
|
|
172
|
-
"field_path" varchar(500) NOT NULL,
|
|
173
|
-
"field_name" varchar(255) NOT NULL,
|
|
174
|
-
"locale" varchar(10) DEFAULT 'default' NOT NULL,
|
|
175
|
-
"parent_path" varchar(500),
|
|
176
|
-
"created_at" timestamp DEFAULT now(),
|
|
177
|
-
"updated_at" timestamp DEFAULT now(),
|
|
178
|
-
"value" jsonb NOT NULL,
|
|
179
|
-
"json_schema" varchar(100),
|
|
180
|
-
"object_keys" text[],
|
|
181
|
-
CONSTRAINT "unique_json_field" UNIQUE("document_version_id","field_path","locale")
|
|
182
|
-
);
|
|
183
|
-
--> statement-breakpoint
|
|
184
|
-
CREATE TABLE "byline_store_meta" (
|
|
185
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
186
|
-
"document_version_id" uuid NOT NULL,
|
|
187
|
-
"collection_id" uuid NOT NULL,
|
|
188
|
-
"type" text NOT NULL,
|
|
189
|
-
"path" text NOT NULL,
|
|
190
|
-
"item_id" varchar(255) NOT NULL,
|
|
191
|
-
"meta" jsonb,
|
|
192
|
-
"created_at" timestamp DEFAULT now(),
|
|
193
|
-
"updated_at" timestamp DEFAULT now(),
|
|
194
|
-
CONSTRAINT "unique_meta_node" UNIQUE("document_version_id","type","path")
|
|
195
|
-
);
|
|
196
|
-
--> statement-breakpoint
|
|
197
|
-
CREATE TABLE "byline_store_numeric" (
|
|
198
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
199
|
-
"document_version_id" uuid NOT NULL,
|
|
200
|
-
"collection_id" uuid NOT NULL,
|
|
201
|
-
"field_path" varchar(500) NOT NULL,
|
|
202
|
-
"field_name" varchar(255) NOT NULL,
|
|
203
|
-
"locale" varchar(10) DEFAULT 'default' NOT NULL,
|
|
204
|
-
"parent_path" varchar(500),
|
|
205
|
-
"created_at" timestamp DEFAULT now(),
|
|
206
|
-
"updated_at" timestamp DEFAULT now(),
|
|
207
|
-
"number_type" varchar(20) NOT NULL,
|
|
208
|
-
"value_integer" integer,
|
|
209
|
-
"value_decimal" numeric(10, 2),
|
|
210
|
-
"value_float" real,
|
|
211
|
-
CONSTRAINT "unique_numeric_field" UNIQUE("document_version_id","field_path","locale")
|
|
212
|
-
);
|
|
213
|
-
--> statement-breakpoint
|
|
214
|
-
CREATE TABLE "byline_store_relation" (
|
|
215
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
216
|
-
"document_version_id" uuid NOT NULL,
|
|
217
|
-
"collection_id" uuid NOT NULL,
|
|
218
|
-
"field_path" varchar(500) NOT NULL,
|
|
219
|
-
"field_name" varchar(255) NOT NULL,
|
|
220
|
-
"locale" varchar(10) DEFAULT 'default' NOT NULL,
|
|
221
|
-
"parent_path" varchar(500),
|
|
222
|
-
"created_at" timestamp DEFAULT now(),
|
|
223
|
-
"updated_at" timestamp DEFAULT now(),
|
|
224
|
-
"target_document_id" uuid NOT NULL,
|
|
225
|
-
"target_collection_id" uuid NOT NULL,
|
|
226
|
-
"relationship_type" varchar(50) DEFAULT 'reference',
|
|
227
|
-
"cascade_delete" boolean DEFAULT false,
|
|
228
|
-
CONSTRAINT "unique_relation_field" UNIQUE("document_version_id","field_path","locale")
|
|
229
|
-
);
|
|
230
|
-
--> statement-breakpoint
|
|
231
|
-
CREATE TABLE "byline_store_text" (
|
|
232
|
-
"id" uuid PRIMARY KEY NOT NULL,
|
|
233
|
-
"document_version_id" uuid NOT NULL,
|
|
234
|
-
"collection_id" uuid NOT NULL,
|
|
235
|
-
"field_path" varchar(500) NOT NULL,
|
|
236
|
-
"field_name" varchar(255) NOT NULL,
|
|
237
|
-
"locale" varchar(10) DEFAULT 'default' NOT NULL,
|
|
238
|
-
"parent_path" varchar(500),
|
|
239
|
-
"created_at" timestamp DEFAULT now(),
|
|
240
|
-
"updated_at" timestamp DEFAULT now(),
|
|
241
|
-
"value" text NOT NULL,
|
|
242
|
-
"word_count" integer,
|
|
243
|
-
CONSTRAINT "unique_text_field" UNIQUE("document_version_id","field_path","locale")
|
|
244
|
-
);
|
|
245
|
-
--> statement-breakpoint
|
|
246
|
-
ALTER TABLE "byline_admin_permissions" ADD CONSTRAINT "byline_admin_permissions_admin_role_id_byline_admin_roles_id_fk" FOREIGN KEY ("admin_role_id") REFERENCES "public"."byline_admin_roles"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
247
|
-
ALTER TABLE "byline_admin_refresh_tokens" ADD CONSTRAINT "byline_admin_refresh_tokens_admin_user_id_byline_admin_users_id_fk" FOREIGN KEY ("admin_user_id") REFERENCES "public"."byline_admin_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
248
|
-
ALTER TABLE "byline_admin_role_admin_user" ADD CONSTRAINT "byline_admin_role_admin_user_admin_role_id_byline_admin_roles_id_fk" FOREIGN KEY ("admin_role_id") REFERENCES "public"."byline_admin_roles"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
249
|
-
ALTER TABLE "byline_admin_role_admin_user" ADD CONSTRAINT "byline_admin_role_admin_user_admin_user_id_byline_admin_users_id_fk" FOREIGN KEY ("admin_user_id") REFERENCES "public"."byline_admin_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
250
|
-
ALTER TABLE "byline_store_boolean" ADD CONSTRAINT "byline_store_boolean_document_version_id_byline_document_versions_id_fk" FOREIGN KEY ("document_version_id") REFERENCES "public"."byline_document_versions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
251
|
-
ALTER TABLE "byline_store_boolean" ADD CONSTRAINT "byline_store_boolean_collection_id_byline_collections_id_fk" FOREIGN KEY ("collection_id") REFERENCES "public"."byline_collections"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
252
|
-
ALTER TABLE "byline_store_datetime" ADD CONSTRAINT "byline_store_datetime_document_version_id_byline_document_versions_id_fk" FOREIGN KEY ("document_version_id") REFERENCES "public"."byline_document_versions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
253
|
-
ALTER TABLE "byline_store_datetime" ADD CONSTRAINT "byline_store_datetime_collection_id_byline_collections_id_fk" FOREIGN KEY ("collection_id") REFERENCES "public"."byline_collections"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
254
|
-
ALTER TABLE "byline_document_relationships" ADD CONSTRAINT "byline_document_relationships_parent_document_id_byline_documents_id_fk" FOREIGN KEY ("parent_document_id") REFERENCES "public"."byline_documents"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
255
|
-
ALTER TABLE "byline_document_relationships" ADD CONSTRAINT "byline_document_relationships_child_document_id_byline_documents_id_fk" FOREIGN KEY ("child_document_id") REFERENCES "public"."byline_documents"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
256
|
-
ALTER TABLE "byline_document_versions" ADD CONSTRAINT "byline_document_versions_document_id_byline_documents_id_fk" FOREIGN KEY ("document_id") REFERENCES "public"."byline_documents"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
257
|
-
ALTER TABLE "byline_document_versions" ADD CONSTRAINT "byline_document_versions_collection_id_byline_collections_id_fk" FOREIGN KEY ("collection_id") REFERENCES "public"."byline_collections"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
258
|
-
ALTER TABLE "byline_documents" ADD CONSTRAINT "byline_documents_collection_id_byline_collections_id_fk" FOREIGN KEY ("collection_id") REFERENCES "public"."byline_collections"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
259
|
-
ALTER TABLE "byline_store_file" ADD CONSTRAINT "byline_store_file_document_version_id_byline_document_versions_id_fk" FOREIGN KEY ("document_version_id") REFERENCES "public"."byline_document_versions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
260
|
-
ALTER TABLE "byline_store_file" ADD CONSTRAINT "byline_store_file_collection_id_byline_collections_id_fk" FOREIGN KEY ("collection_id") REFERENCES "public"."byline_collections"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
261
|
-
ALTER TABLE "byline_store_json" ADD CONSTRAINT "byline_store_json_document_version_id_byline_document_versions_id_fk" FOREIGN KEY ("document_version_id") REFERENCES "public"."byline_document_versions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
262
|
-
ALTER TABLE "byline_store_json" ADD CONSTRAINT "byline_store_json_collection_id_byline_collections_id_fk" FOREIGN KEY ("collection_id") REFERENCES "public"."byline_collections"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
263
|
-
ALTER TABLE "byline_store_meta" ADD CONSTRAINT "byline_store_meta_document_version_id_byline_document_versions_id_fk" FOREIGN KEY ("document_version_id") REFERENCES "public"."byline_document_versions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
264
|
-
ALTER TABLE "byline_store_meta" ADD CONSTRAINT "byline_store_meta_collection_id_byline_collections_id_fk" FOREIGN KEY ("collection_id") REFERENCES "public"."byline_collections"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
265
|
-
ALTER TABLE "byline_store_numeric" ADD CONSTRAINT "byline_store_numeric_document_version_id_byline_document_versions_id_fk" FOREIGN KEY ("document_version_id") REFERENCES "public"."byline_document_versions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
266
|
-
ALTER TABLE "byline_store_numeric" ADD CONSTRAINT "byline_store_numeric_collection_id_byline_collections_id_fk" FOREIGN KEY ("collection_id") REFERENCES "public"."byline_collections"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
267
|
-
ALTER TABLE "byline_store_relation" ADD CONSTRAINT "byline_store_relation_document_version_id_byline_document_versions_id_fk" FOREIGN KEY ("document_version_id") REFERENCES "public"."byline_document_versions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
268
|
-
ALTER TABLE "byline_store_relation" ADD CONSTRAINT "byline_store_relation_collection_id_byline_collections_id_fk" FOREIGN KEY ("collection_id") REFERENCES "public"."byline_collections"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
269
|
-
ALTER TABLE "byline_store_relation" ADD CONSTRAINT "byline_store_relation_target_document_id_byline_documents_id_fk" FOREIGN KEY ("target_document_id") REFERENCES "public"."byline_documents"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
270
|
-
ALTER TABLE "byline_store_relation" ADD CONSTRAINT "byline_store_relation_target_collection_id_byline_collections_id_fk" FOREIGN KEY ("target_collection_id") REFERENCES "public"."byline_collections"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
271
|
-
ALTER TABLE "byline_store_text" ADD CONSTRAINT "byline_store_text_document_version_id_byline_document_versions_id_fk" FOREIGN KEY ("document_version_id") REFERENCES "public"."byline_document_versions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
272
|
-
ALTER TABLE "byline_store_text" ADD CONSTRAINT "byline_store_text_collection_id_byline_collections_id_fk" FOREIGN KEY ("collection_id") REFERENCES "public"."byline_collections"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
273
|
-
CREATE INDEX "idx_byline_admin_permissions_role" ON "byline_admin_permissions" USING btree ("admin_role_id");--> statement-breakpoint
|
|
274
|
-
CREATE INDEX "idx_byline_admin_refresh_tokens_user" ON "byline_admin_refresh_tokens" USING btree ("admin_user_id");--> statement-breakpoint
|
|
275
|
-
CREATE INDEX "idx_byline_admin_refresh_tokens_token_hash" ON "byline_admin_refresh_tokens" USING btree ("token_hash");--> statement-breakpoint
|
|
276
|
-
CREATE INDEX "idx_byline_admin_role_admin_user_user" ON "byline_admin_role_admin_user" USING btree ("admin_user_id");--> statement-breakpoint
|
|
277
|
-
CREATE INDEX "idx_byline_admin_roles_machine_name" ON "byline_admin_roles" USING btree ("machine_name");--> statement-breakpoint
|
|
278
|
-
CREATE INDEX "idx_byline_admin_users_email" ON "byline_admin_users" USING btree ("email");--> statement-breakpoint
|
|
279
|
-
CREATE INDEX "idx_boolean_value" ON "byline_store_boolean" USING btree ("value");--> statement-breakpoint
|
|
280
|
-
CREATE INDEX "idx_boolean_path_value" ON "byline_store_boolean" USING btree ("field_path","value");--> statement-breakpoint
|
|
281
|
-
CREATE INDEX "idx_boolean_collection_value" ON "byline_store_boolean" USING btree ("collection_id","field_path","value");--> statement-breakpoint
|
|
282
|
-
CREATE INDEX "idx_datetime_date" ON "byline_store_datetime" USING btree ("value_date");--> statement-breakpoint
|
|
283
|
-
CREATE INDEX "idx_datetime_timestamp_tz" ON "byline_store_datetime" USING btree ("value_timestamp_tz");--> statement-breakpoint
|
|
284
|
-
CREATE INDEX "idx_datetime_path_date" ON "byline_store_datetime" USING btree ("field_path","value_timestamp_tz");--> statement-breakpoint
|
|
285
|
-
CREATE INDEX "idx_datetime_collection_date" ON "byline_store_datetime" USING btree ("collection_id","value_timestamp_tz");--> statement-breakpoint
|
|
286
|
-
CREATE INDEX "idx_document_relationships_parent" ON "byline_document_relationships" USING btree ("parent_document_id");--> statement-breakpoint
|
|
287
|
-
CREATE INDEX "idx_document_relationships_child" ON "byline_document_relationships" USING btree ("child_document_id");--> statement-breakpoint
|
|
288
|
-
CREATE INDEX "idx_documents_document_id" ON "byline_document_versions" USING btree ("document_id");--> statement-breakpoint
|
|
289
|
-
CREATE INDEX "idx_documents_collection_path_deleted" ON "byline_document_versions" USING btree ("collection_id","path","is_deleted");--> statement-breakpoint
|
|
290
|
-
CREATE INDEX "idx_documents_collection_document_deleted" ON "byline_document_versions" USING btree ("collection_id","document_id","is_deleted");--> statement-breakpoint
|
|
291
|
-
CREATE INDEX "idx_documents_current_view" ON "byline_document_versions" USING btree ("collection_id","document_id","is_deleted","id");--> statement-breakpoint
|
|
292
|
-
CREATE INDEX "idx_documents_event_type" ON "byline_document_versions" USING btree ("event_type");--> statement-breakpoint
|
|
293
|
-
CREATE INDEX "idx_documents_created_at" ON "byline_document_versions" USING btree ("created_at");--> statement-breakpoint
|
|
294
|
-
CREATE INDEX "idx_documents_document_collection" ON "byline_document_versions" USING btree ("document_id","collection_id");--> statement-breakpoint
|
|
295
|
-
CREATE INDEX "idx_documents_collection" ON "byline_documents" USING btree ("collection_id");--> statement-breakpoint
|
|
296
|
-
CREATE INDEX "idx_file_file_id" ON "byline_store_file" USING btree ("file_id");--> statement-breakpoint
|
|
297
|
-
CREATE INDEX "idx_file_mime_type" ON "byline_store_file" USING btree ("mime_type");--> statement-breakpoint
|
|
298
|
-
CREATE INDEX "idx_file_size" ON "byline_store_file" USING btree ("file_size");--> statement-breakpoint
|
|
299
|
-
CREATE INDEX "idx_file_hash" ON "byline_store_file" USING btree ("file_hash");--> statement-breakpoint
|
|
300
|
-
CREATE INDEX "idx_file_image_dimensions" ON "byline_store_file" USING btree ("image_width","image_height");--> statement-breakpoint
|
|
301
|
-
CREATE INDEX "idx_file_storage_provider" ON "byline_store_file" USING btree ("storage_provider");--> statement-breakpoint
|
|
302
|
-
CREATE INDEX "idx_file_processing_status" ON "byline_store_file" USING btree ("processing_status");--> statement-breakpoint
|
|
303
|
-
CREATE INDEX "idx_json_value_gin" ON "byline_store_json" USING gin ("value");--> statement-breakpoint
|
|
304
|
-
CREATE INDEX "idx_json_schema" ON "byline_store_json" USING btree ("json_schema");--> statement-breakpoint
|
|
305
|
-
CREATE INDEX "idx_json_keys" ON "byline_store_json" USING gin ("object_keys");--> statement-breakpoint
|
|
306
|
-
CREATE INDEX "idx_meta_document_type_path" ON "byline_store_meta" USING btree ("document_version_id","type","path");--> statement-breakpoint
|
|
307
|
-
CREATE INDEX "idx_meta_item_id" ON "byline_store_meta" USING btree ("item_id");--> statement-breakpoint
|
|
308
|
-
CREATE INDEX "idx_meta_collection_type" ON "byline_store_meta" USING btree ("collection_id","type");--> statement-breakpoint
|
|
309
|
-
CREATE INDEX "idx_numeric_integer" ON "byline_store_numeric" USING btree ("value_integer");--> statement-breakpoint
|
|
310
|
-
CREATE INDEX "idx_numeric_decimal" ON "byline_store_numeric" USING btree ("value_decimal");--> statement-breakpoint
|
|
311
|
-
CREATE INDEX "idx_numeric_float" ON "byline_store_numeric" USING btree ("value_float");--> statement-breakpoint
|
|
312
|
-
CREATE INDEX "idx_numeric_integer_range" ON "byline_store_numeric" USING btree ("field_path","value_integer");--> statement-breakpoint
|
|
313
|
-
CREATE INDEX "idx_numeric_decimal_range" ON "byline_store_numeric" USING btree ("field_path","value_decimal");--> statement-breakpoint
|
|
314
|
-
CREATE INDEX "idx_relation_target_document" ON "byline_store_relation" USING btree ("target_document_id");--> statement-breakpoint
|
|
315
|
-
CREATE INDEX "idx_relation_target_collection" ON "byline_store_relation" USING btree ("target_collection_id");--> statement-breakpoint
|
|
316
|
-
CREATE INDEX "idx_relation_type" ON "byline_store_relation" USING btree ("relationship_type");--> statement-breakpoint
|
|
317
|
-
CREATE INDEX "idx_relation_reverse" ON "byline_store_relation" USING btree ("target_document_id","field_path");--> statement-breakpoint
|
|
318
|
-
CREATE INDEX "idx_relation_collection_to_collection" ON "byline_store_relation" USING btree ("collection_id","target_collection_id");--> statement-breakpoint
|
|
319
|
-
CREATE INDEX "idx_text_value" ON "byline_store_text" USING btree ("value");--> statement-breakpoint
|
|
320
|
-
CREATE INDEX "idx_text_fulltext" ON "byline_store_text" USING gin (to_tsvector('english', "value"));--> statement-breakpoint
|
|
321
|
-
CREATE INDEX "idx_text_locale_value" ON "byline_store_text" USING btree ("locale","value");--> statement-breakpoint
|
|
322
|
-
CREATE INDEX "idx_text_path_value" ON "byline_store_text" USING btree ("field_path","value");--> statement-breakpoint
|
|
323
|
-
CREATE VIEW "public"."byline_current_documents" AS (with "sq" as (select "id", "document_id", "collection_id", "collection_version", "path", "event_type", "status", "is_deleted", "created_at", "updated_at", "created_by", "change_summary", row_number() OVER (PARTITION BY "document_id" ORDER BY "id" DESC) as "rn" from "byline_document_versions" where "byline_document_versions"."is_deleted" = false) select "id", "document_id", "collection_id", "collection_version", "path", "event_type", "status", "is_deleted", "created_at", "updated_at", "created_by", "change_summary" from "sq" where "rn" = 1);--> statement-breakpoint
|
|
324
|
-
CREATE VIEW "public"."byline_current_published_documents" AS (with "sq" as (select "id", "document_id", "collection_id", "collection_version", "path", "event_type", "status", "is_deleted", "created_at", "updated_at", "created_by", "change_summary", row_number() OVER (PARTITION BY "document_id" ORDER BY "id" DESC) as "rn" from "byline_document_versions" where "byline_document_versions"."is_deleted" = false AND "byline_document_versions"."status" = 'published') select "id", "document_id", "collection_id", "collection_version", "path", "event_type", "status", "is_deleted", "created_at", "updated_at", "created_by", "change_summary" from "sq" where "rn" = 1);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ALTER TABLE "byline_store_file" ADD COLUMN "variants" jsonb;
|