@byline/cli 1.7.7 → 1.8.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/dist/templates/byline/server.config.ts +1 -0
- package/dist/templates/byline-examples/server.config.ts +1 -0
- package/dist/templates/migrations/0000_hard_madame_hydra.sql +337 -0
- package/dist/templates/migrations/meta/0000_snapshot.json +351 -119
- package/dist/templates/migrations/meta/_journal.json +3 -10
- package/package.json +1 -1
|
@@ -50,6 +50,7 @@ async function buildBylineCore(): Promise<BylineCore<AdminStore>> {
|
|
|
50
50
|
const db = pgAdapter({
|
|
51
51
|
connectionString: process.env.DB_CONNECTION_STRING || '',
|
|
52
52
|
collections,
|
|
53
|
+
defaultContentLocale: i18n.content.defaultLocale,
|
|
53
54
|
})
|
|
54
55
|
|
|
55
56
|
const adminStore = createAdminStore(db.drizzle)
|
|
@@ -81,6 +81,7 @@ async function buildBylineCore(): Promise<BylineCore<AdminStore>> {
|
|
|
81
81
|
const db = pgAdapter({
|
|
82
82
|
connectionString: process.env.DB_CONNECTION_STRING || '',
|
|
83
83
|
collections,
|
|
84
|
+
defaultContentLocale: i18n.content.defaultLocale,
|
|
84
85
|
})
|
|
85
86
|
|
|
86
87
|
const adminStore = createAdminStore(db.drizzle)
|
|
@@ -0,0 +1,337 @@
|
|
|
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_paths" (
|
|
112
|
+
"document_id" uuid NOT NULL,
|
|
113
|
+
"locale" varchar(10) NOT NULL,
|
|
114
|
+
"collection_id" uuid NOT NULL,
|
|
115
|
+
"path" varchar(255) NOT NULL,
|
|
116
|
+
"created_at" timestamp DEFAULT now(),
|
|
117
|
+
"updated_at" timestamp DEFAULT now(),
|
|
118
|
+
CONSTRAINT "unique_document_paths_document_locale" UNIQUE("document_id","locale"),
|
|
119
|
+
CONSTRAINT "idx_document_paths_collection_locale_path" UNIQUE("collection_id","locale","path")
|
|
120
|
+
);
|
|
121
|
+
--> statement-breakpoint
|
|
122
|
+
CREATE TABLE "byline_document_relationships" (
|
|
123
|
+
"parent_document_id" uuid NOT NULL,
|
|
124
|
+
"child_document_id" uuid NOT NULL,
|
|
125
|
+
"created_at" timestamp DEFAULT now(),
|
|
126
|
+
CONSTRAINT "byline_document_relationships_parent_document_id_child_document_id_unique" UNIQUE("parent_document_id","child_document_id")
|
|
127
|
+
);
|
|
128
|
+
--> statement-breakpoint
|
|
129
|
+
CREATE TABLE "byline_document_versions" (
|
|
130
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
131
|
+
"document_id" uuid NOT NULL,
|
|
132
|
+
"collection_id" uuid NOT NULL,
|
|
133
|
+
"collection_version" integer NOT NULL,
|
|
134
|
+
"doc" jsonb,
|
|
135
|
+
"event_type" varchar(20) DEFAULT 'create' NOT NULL,
|
|
136
|
+
"status" varchar(50) DEFAULT 'draft',
|
|
137
|
+
"is_deleted" boolean DEFAULT false,
|
|
138
|
+
"created_at" timestamp DEFAULT now(),
|
|
139
|
+
"updated_at" timestamp DEFAULT now(),
|
|
140
|
+
"created_by" uuid,
|
|
141
|
+
"change_summary" text
|
|
142
|
+
);
|
|
143
|
+
--> statement-breakpoint
|
|
144
|
+
CREATE TABLE "byline_documents" (
|
|
145
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
146
|
+
"collection_id" uuid NOT NULL,
|
|
147
|
+
"created_at" timestamp DEFAULT now(),
|
|
148
|
+
"updated_at" timestamp DEFAULT now()
|
|
149
|
+
);
|
|
150
|
+
--> statement-breakpoint
|
|
151
|
+
CREATE TABLE "byline_store_file" (
|
|
152
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
153
|
+
"document_version_id" uuid NOT NULL,
|
|
154
|
+
"collection_id" uuid NOT NULL,
|
|
155
|
+
"field_path" varchar(500) NOT NULL,
|
|
156
|
+
"field_name" varchar(255) NOT NULL,
|
|
157
|
+
"locale" varchar(10) DEFAULT 'default' NOT NULL,
|
|
158
|
+
"parent_path" varchar(500),
|
|
159
|
+
"created_at" timestamp DEFAULT now(),
|
|
160
|
+
"updated_at" timestamp DEFAULT now(),
|
|
161
|
+
"file_id" uuid NOT NULL,
|
|
162
|
+
"filename" varchar(255) NOT NULL,
|
|
163
|
+
"original_filename" varchar(255) NOT NULL,
|
|
164
|
+
"mime_type" varchar(100) NOT NULL,
|
|
165
|
+
"file_size" bigint NOT NULL,
|
|
166
|
+
"file_hash" varchar(64),
|
|
167
|
+
"storage_provider" varchar(50) NOT NULL,
|
|
168
|
+
"storage_path" text NOT NULL,
|
|
169
|
+
"storage_url" text,
|
|
170
|
+
"image_width" integer,
|
|
171
|
+
"image_height" integer,
|
|
172
|
+
"image_format" varchar(20),
|
|
173
|
+
"processing_status" varchar(20) DEFAULT 'pending',
|
|
174
|
+
"thumbnail_generated" boolean DEFAULT false,
|
|
175
|
+
"variants" jsonb,
|
|
176
|
+
CONSTRAINT "unique_file_field" UNIQUE("document_version_id","field_path","locale")
|
|
177
|
+
);
|
|
178
|
+
--> statement-breakpoint
|
|
179
|
+
CREATE TABLE "byline_store_json" (
|
|
180
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
181
|
+
"document_version_id" uuid NOT NULL,
|
|
182
|
+
"collection_id" uuid NOT NULL,
|
|
183
|
+
"field_path" varchar(500) NOT NULL,
|
|
184
|
+
"field_name" varchar(255) NOT NULL,
|
|
185
|
+
"locale" varchar(10) DEFAULT 'default' NOT NULL,
|
|
186
|
+
"parent_path" varchar(500),
|
|
187
|
+
"created_at" timestamp DEFAULT now(),
|
|
188
|
+
"updated_at" timestamp DEFAULT now(),
|
|
189
|
+
"value" jsonb NOT NULL,
|
|
190
|
+
"json_schema" varchar(100),
|
|
191
|
+
"object_keys" text[],
|
|
192
|
+
CONSTRAINT "unique_json_field" UNIQUE("document_version_id","field_path","locale")
|
|
193
|
+
);
|
|
194
|
+
--> statement-breakpoint
|
|
195
|
+
CREATE TABLE "byline_store_meta" (
|
|
196
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
197
|
+
"document_version_id" uuid NOT NULL,
|
|
198
|
+
"collection_id" uuid NOT NULL,
|
|
199
|
+
"type" text NOT NULL,
|
|
200
|
+
"path" text NOT NULL,
|
|
201
|
+
"item_id" varchar(255) NOT NULL,
|
|
202
|
+
"meta" jsonb,
|
|
203
|
+
"created_at" timestamp DEFAULT now(),
|
|
204
|
+
"updated_at" timestamp DEFAULT now(),
|
|
205
|
+
CONSTRAINT "unique_meta_node" UNIQUE("document_version_id","type","path")
|
|
206
|
+
);
|
|
207
|
+
--> statement-breakpoint
|
|
208
|
+
CREATE TABLE "byline_store_numeric" (
|
|
209
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
210
|
+
"document_version_id" uuid NOT NULL,
|
|
211
|
+
"collection_id" uuid NOT NULL,
|
|
212
|
+
"field_path" varchar(500) NOT NULL,
|
|
213
|
+
"field_name" varchar(255) NOT NULL,
|
|
214
|
+
"locale" varchar(10) DEFAULT 'default' NOT NULL,
|
|
215
|
+
"parent_path" varchar(500),
|
|
216
|
+
"created_at" timestamp DEFAULT now(),
|
|
217
|
+
"updated_at" timestamp DEFAULT now(),
|
|
218
|
+
"number_type" varchar(20) NOT NULL,
|
|
219
|
+
"value_integer" integer,
|
|
220
|
+
"value_decimal" numeric(10, 2),
|
|
221
|
+
"value_float" real,
|
|
222
|
+
CONSTRAINT "unique_numeric_field" UNIQUE("document_version_id","field_path","locale")
|
|
223
|
+
);
|
|
224
|
+
--> statement-breakpoint
|
|
225
|
+
CREATE TABLE "byline_store_relation" (
|
|
226
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
227
|
+
"document_version_id" uuid NOT NULL,
|
|
228
|
+
"collection_id" uuid NOT NULL,
|
|
229
|
+
"field_path" varchar(500) NOT NULL,
|
|
230
|
+
"field_name" varchar(255) NOT NULL,
|
|
231
|
+
"locale" varchar(10) DEFAULT 'default' NOT NULL,
|
|
232
|
+
"parent_path" varchar(500),
|
|
233
|
+
"created_at" timestamp DEFAULT now(),
|
|
234
|
+
"updated_at" timestamp DEFAULT now(),
|
|
235
|
+
"target_document_id" uuid NOT NULL,
|
|
236
|
+
"target_collection_id" uuid NOT NULL,
|
|
237
|
+
"relationship_type" varchar(50) DEFAULT 'reference',
|
|
238
|
+
"cascade_delete" boolean DEFAULT false,
|
|
239
|
+
CONSTRAINT "unique_relation_field" UNIQUE("document_version_id","field_path","locale")
|
|
240
|
+
);
|
|
241
|
+
--> statement-breakpoint
|
|
242
|
+
CREATE TABLE "byline_store_text" (
|
|
243
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
244
|
+
"document_version_id" uuid NOT NULL,
|
|
245
|
+
"collection_id" uuid NOT NULL,
|
|
246
|
+
"field_path" varchar(500) NOT NULL,
|
|
247
|
+
"field_name" varchar(255) NOT NULL,
|
|
248
|
+
"locale" varchar(10) DEFAULT 'default' NOT NULL,
|
|
249
|
+
"parent_path" varchar(500),
|
|
250
|
+
"created_at" timestamp DEFAULT now(),
|
|
251
|
+
"updated_at" timestamp DEFAULT now(),
|
|
252
|
+
"value" text NOT NULL,
|
|
253
|
+
"word_count" integer,
|
|
254
|
+
CONSTRAINT "unique_text_field" UNIQUE("document_version_id","field_path","locale")
|
|
255
|
+
);
|
|
256
|
+
--> statement-breakpoint
|
|
257
|
+
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
|
|
258
|
+
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
|
|
259
|
+
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
|
|
260
|
+
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
|
|
261
|
+
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
|
|
262
|
+
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
|
|
263
|
+
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
|
|
264
|
+
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
|
|
265
|
+
ALTER TABLE "byline_document_paths" ADD CONSTRAINT "byline_document_paths_document_id_byline_documents_id_fk" FOREIGN KEY ("document_id") REFERENCES "public"."byline_documents"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
266
|
+
ALTER TABLE "byline_document_paths" ADD CONSTRAINT "byline_document_paths_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_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
|
|
268
|
+
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
|
|
269
|
+
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
|
|
270
|
+
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
|
|
271
|
+
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
|
|
272
|
+
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
|
|
273
|
+
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
|
|
274
|
+
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
|
|
275
|
+
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
|
|
276
|
+
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
|
|
277
|
+
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
|
|
278
|
+
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
|
|
279
|
+
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
|
|
280
|
+
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
|
|
281
|
+
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
|
|
282
|
+
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
|
|
283
|
+
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
|
|
284
|
+
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
|
|
285
|
+
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
|
|
286
|
+
CREATE INDEX "idx_byline_admin_permissions_role" ON "byline_admin_permissions" USING btree ("admin_role_id");--> statement-breakpoint
|
|
287
|
+
CREATE INDEX "idx_byline_admin_refresh_tokens_user" ON "byline_admin_refresh_tokens" USING btree ("admin_user_id");--> statement-breakpoint
|
|
288
|
+
CREATE INDEX "idx_byline_admin_refresh_tokens_token_hash" ON "byline_admin_refresh_tokens" USING btree ("token_hash");--> statement-breakpoint
|
|
289
|
+
CREATE INDEX "idx_byline_admin_role_admin_user_user" ON "byline_admin_role_admin_user" USING btree ("admin_user_id");--> statement-breakpoint
|
|
290
|
+
CREATE INDEX "idx_byline_admin_roles_machine_name" ON "byline_admin_roles" USING btree ("machine_name");--> statement-breakpoint
|
|
291
|
+
CREATE INDEX "idx_byline_admin_users_email" ON "byline_admin_users" USING btree ("email");--> statement-breakpoint
|
|
292
|
+
CREATE INDEX "idx_boolean_value" ON "byline_store_boolean" USING btree ("value");--> statement-breakpoint
|
|
293
|
+
CREATE INDEX "idx_boolean_path_value" ON "byline_store_boolean" USING btree ("field_path","value");--> statement-breakpoint
|
|
294
|
+
CREATE INDEX "idx_boolean_collection_value" ON "byline_store_boolean" USING btree ("collection_id","field_path","value");--> statement-breakpoint
|
|
295
|
+
CREATE INDEX "idx_datetime_date" ON "byline_store_datetime" USING btree ("value_date");--> statement-breakpoint
|
|
296
|
+
CREATE INDEX "idx_datetime_timestamp_tz" ON "byline_store_datetime" USING btree ("value_timestamp_tz");--> statement-breakpoint
|
|
297
|
+
CREATE INDEX "idx_datetime_path_date" ON "byline_store_datetime" USING btree ("field_path","value_timestamp_tz");--> statement-breakpoint
|
|
298
|
+
CREATE INDEX "idx_datetime_collection_date" ON "byline_store_datetime" USING btree ("collection_id","value_timestamp_tz");--> statement-breakpoint
|
|
299
|
+
CREATE INDEX "idx_document_paths_document_id" ON "byline_document_paths" USING btree ("document_id");--> statement-breakpoint
|
|
300
|
+
CREATE INDEX "idx_document_relationships_parent" ON "byline_document_relationships" USING btree ("parent_document_id");--> statement-breakpoint
|
|
301
|
+
CREATE INDEX "idx_document_relationships_child" ON "byline_document_relationships" USING btree ("child_document_id");--> statement-breakpoint
|
|
302
|
+
CREATE INDEX "idx_documents_document_id" ON "byline_document_versions" USING btree ("document_id");--> statement-breakpoint
|
|
303
|
+
CREATE INDEX "idx_documents_collection_document_deleted" ON "byline_document_versions" USING btree ("collection_id","document_id","is_deleted");--> statement-breakpoint
|
|
304
|
+
CREATE INDEX "idx_documents_current_view" ON "byline_document_versions" USING btree ("collection_id","document_id","is_deleted","id");--> statement-breakpoint
|
|
305
|
+
CREATE INDEX "idx_documents_event_type" ON "byline_document_versions" USING btree ("event_type");--> statement-breakpoint
|
|
306
|
+
CREATE INDEX "idx_documents_created_at" ON "byline_document_versions" USING btree ("created_at");--> statement-breakpoint
|
|
307
|
+
CREATE INDEX "idx_documents_document_collection" ON "byline_document_versions" USING btree ("document_id","collection_id");--> statement-breakpoint
|
|
308
|
+
CREATE INDEX "idx_documents_collection" ON "byline_documents" USING btree ("collection_id");--> statement-breakpoint
|
|
309
|
+
CREATE INDEX "idx_file_file_id" ON "byline_store_file" USING btree ("file_id");--> statement-breakpoint
|
|
310
|
+
CREATE INDEX "idx_file_mime_type" ON "byline_store_file" USING btree ("mime_type");--> statement-breakpoint
|
|
311
|
+
CREATE INDEX "idx_file_size" ON "byline_store_file" USING btree ("file_size");--> statement-breakpoint
|
|
312
|
+
CREATE INDEX "idx_file_hash" ON "byline_store_file" USING btree ("file_hash");--> statement-breakpoint
|
|
313
|
+
CREATE INDEX "idx_file_image_dimensions" ON "byline_store_file" USING btree ("image_width","image_height");--> statement-breakpoint
|
|
314
|
+
CREATE INDEX "idx_file_storage_provider" ON "byline_store_file" USING btree ("storage_provider");--> statement-breakpoint
|
|
315
|
+
CREATE INDEX "idx_file_processing_status" ON "byline_store_file" USING btree ("processing_status");--> statement-breakpoint
|
|
316
|
+
CREATE INDEX "idx_json_value_gin" ON "byline_store_json" USING gin ("value");--> statement-breakpoint
|
|
317
|
+
CREATE INDEX "idx_json_schema" ON "byline_store_json" USING btree ("json_schema");--> statement-breakpoint
|
|
318
|
+
CREATE INDEX "idx_json_keys" ON "byline_store_json" USING gin ("object_keys");--> statement-breakpoint
|
|
319
|
+
CREATE INDEX "idx_meta_document_type_path" ON "byline_store_meta" USING btree ("document_version_id","type","path");--> statement-breakpoint
|
|
320
|
+
CREATE INDEX "idx_meta_item_id" ON "byline_store_meta" USING btree ("item_id");--> statement-breakpoint
|
|
321
|
+
CREATE INDEX "idx_meta_collection_type" ON "byline_store_meta" USING btree ("collection_id","type");--> statement-breakpoint
|
|
322
|
+
CREATE INDEX "idx_numeric_integer" ON "byline_store_numeric" USING btree ("value_integer");--> statement-breakpoint
|
|
323
|
+
CREATE INDEX "idx_numeric_decimal" ON "byline_store_numeric" USING btree ("value_decimal");--> statement-breakpoint
|
|
324
|
+
CREATE INDEX "idx_numeric_float" ON "byline_store_numeric" USING btree ("value_float");--> statement-breakpoint
|
|
325
|
+
CREATE INDEX "idx_numeric_integer_range" ON "byline_store_numeric" USING btree ("field_path","value_integer");--> statement-breakpoint
|
|
326
|
+
CREATE INDEX "idx_numeric_decimal_range" ON "byline_store_numeric" USING btree ("field_path","value_decimal");--> statement-breakpoint
|
|
327
|
+
CREATE INDEX "idx_relation_target_document" ON "byline_store_relation" USING btree ("target_document_id");--> statement-breakpoint
|
|
328
|
+
CREATE INDEX "idx_relation_target_collection" ON "byline_store_relation" USING btree ("target_collection_id");--> statement-breakpoint
|
|
329
|
+
CREATE INDEX "idx_relation_type" ON "byline_store_relation" USING btree ("relationship_type");--> statement-breakpoint
|
|
330
|
+
CREATE INDEX "idx_relation_reverse" ON "byline_store_relation" USING btree ("target_document_id","field_path");--> statement-breakpoint
|
|
331
|
+
CREATE INDEX "idx_relation_collection_to_collection" ON "byline_store_relation" USING btree ("collection_id","target_collection_id");--> statement-breakpoint
|
|
332
|
+
CREATE INDEX "idx_text_value" ON "byline_store_text" USING btree ("value");--> statement-breakpoint
|
|
333
|
+
CREATE INDEX "idx_text_fulltext" ON "byline_store_text" USING gin (to_tsvector('english', "value"));--> statement-breakpoint
|
|
334
|
+
CREATE INDEX "idx_text_locale_value" ON "byline_store_text" USING btree ("locale","value");--> statement-breakpoint
|
|
335
|
+
CREATE INDEX "idx_text_path_value" ON "byline_store_text" USING btree ("field_path","value");--> statement-breakpoint
|
|
336
|
+
CREATE VIEW "public"."byline_current_documents" AS (with "sq" as (select "id", "document_id", "collection_id", "collection_version", "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", "event_type", "status", "is_deleted", "created_at", "updated_at", "created_by", "change_summary" from "sq" where "rn" = 1);--> statement-breakpoint
|
|
337
|
+
CREATE VIEW "public"."byline_current_published_documents" AS (with "sq" as (select "id", "document_id", "collection_id", "collection_version", "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", "event_type", "status", "is_deleted", "created_at", "updated_at", "created_by", "change_summary" from "sq" where "rn" = 1);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "
|
|
2
|
+
"id": "105b3c91-dfd4-42ae-8071-eb75beda0f63",
|
|
3
3
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
4
4
|
"version": "7",
|
|
5
5
|
"dialect": "postgresql",
|
|
@@ -70,8 +70,12 @@
|
|
|
70
70
|
"name": "byline_admin_permissions_admin_role_id_byline_admin_roles_id_fk",
|
|
71
71
|
"tableFrom": "byline_admin_permissions",
|
|
72
72
|
"tableTo": "byline_admin_roles",
|
|
73
|
-
"columnsFrom": [
|
|
74
|
-
|
|
73
|
+
"columnsFrom": [
|
|
74
|
+
"admin_role_id"
|
|
75
|
+
],
|
|
76
|
+
"columnsTo": [
|
|
77
|
+
"id"
|
|
78
|
+
],
|
|
75
79
|
"onDelete": "cascade",
|
|
76
80
|
"onUpdate": "no action"
|
|
77
81
|
}
|
|
@@ -81,7 +85,10 @@
|
|
|
81
85
|
"uq_byline_admin_permissions_role_ability": {
|
|
82
86
|
"name": "uq_byline_admin_permissions_role_ability",
|
|
83
87
|
"nullsNotDistinct": false,
|
|
84
|
-
"columns": [
|
|
88
|
+
"columns": [
|
|
89
|
+
"admin_role_id",
|
|
90
|
+
"ability"
|
|
91
|
+
]
|
|
85
92
|
}
|
|
86
93
|
},
|
|
87
94
|
"policies": {},
|
|
@@ -205,8 +212,12 @@
|
|
|
205
212
|
"name": "byline_admin_refresh_tokens_admin_user_id_byline_admin_users_id_fk",
|
|
206
213
|
"tableFrom": "byline_admin_refresh_tokens",
|
|
207
214
|
"tableTo": "byline_admin_users",
|
|
208
|
-
"columnsFrom": [
|
|
209
|
-
|
|
215
|
+
"columnsFrom": [
|
|
216
|
+
"admin_user_id"
|
|
217
|
+
],
|
|
218
|
+
"columnsTo": [
|
|
219
|
+
"id"
|
|
220
|
+
],
|
|
210
221
|
"onDelete": "cascade",
|
|
211
222
|
"onUpdate": "no action"
|
|
212
223
|
}
|
|
@@ -216,7 +227,9 @@
|
|
|
216
227
|
"byline_admin_refresh_tokens_token_hash_unique": {
|
|
217
228
|
"name": "byline_admin_refresh_tokens_token_hash_unique",
|
|
218
229
|
"nullsNotDistinct": false,
|
|
219
|
-
"columns": [
|
|
230
|
+
"columns": [
|
|
231
|
+
"token_hash"
|
|
232
|
+
]
|
|
220
233
|
}
|
|
221
234
|
},
|
|
222
235
|
"policies": {},
|
|
@@ -269,8 +282,12 @@
|
|
|
269
282
|
"name": "byline_admin_role_admin_user_admin_role_id_byline_admin_roles_id_fk",
|
|
270
283
|
"tableFrom": "byline_admin_role_admin_user",
|
|
271
284
|
"tableTo": "byline_admin_roles",
|
|
272
|
-
"columnsFrom": [
|
|
273
|
-
|
|
285
|
+
"columnsFrom": [
|
|
286
|
+
"admin_role_id"
|
|
287
|
+
],
|
|
288
|
+
"columnsTo": [
|
|
289
|
+
"id"
|
|
290
|
+
],
|
|
274
291
|
"onDelete": "cascade",
|
|
275
292
|
"onUpdate": "no action"
|
|
276
293
|
},
|
|
@@ -278,8 +295,12 @@
|
|
|
278
295
|
"name": "byline_admin_role_admin_user_admin_user_id_byline_admin_users_id_fk",
|
|
279
296
|
"tableFrom": "byline_admin_role_admin_user",
|
|
280
297
|
"tableTo": "byline_admin_users",
|
|
281
|
-
"columnsFrom": [
|
|
282
|
-
|
|
298
|
+
"columnsFrom": [
|
|
299
|
+
"admin_user_id"
|
|
300
|
+
],
|
|
301
|
+
"columnsTo": [
|
|
302
|
+
"id"
|
|
303
|
+
],
|
|
283
304
|
"onDelete": "cascade",
|
|
284
305
|
"onUpdate": "no action"
|
|
285
306
|
}
|
|
@@ -287,7 +308,10 @@
|
|
|
287
308
|
"compositePrimaryKeys": {
|
|
288
309
|
"byline_admin_role_admin_user_admin_role_id_admin_user_id_pk": {
|
|
289
310
|
"name": "byline_admin_role_admin_user_admin_role_id_admin_user_id_pk",
|
|
290
|
-
"columns": [
|
|
311
|
+
"columns": [
|
|
312
|
+
"admin_role_id",
|
|
313
|
+
"admin_user_id"
|
|
314
|
+
]
|
|
291
315
|
}
|
|
292
316
|
},
|
|
293
317
|
"uniqueConstraints": {},
|
|
@@ -375,7 +399,9 @@
|
|
|
375
399
|
"byline_admin_roles_machine_name_unique": {
|
|
376
400
|
"name": "byline_admin_roles_machine_name_unique",
|
|
377
401
|
"nullsNotDistinct": false,
|
|
378
|
-
"columns": [
|
|
402
|
+
"columns": [
|
|
403
|
+
"machine_name"
|
|
404
|
+
]
|
|
379
405
|
}
|
|
380
406
|
},
|
|
381
407
|
"policies": {},
|
|
@@ -514,12 +540,16 @@
|
|
|
514
540
|
"byline_admin_users_username_unique": {
|
|
515
541
|
"name": "byline_admin_users_username_unique",
|
|
516
542
|
"nullsNotDistinct": false,
|
|
517
|
-
"columns": [
|
|
543
|
+
"columns": [
|
|
544
|
+
"username"
|
|
545
|
+
]
|
|
518
546
|
},
|
|
519
547
|
"byline_admin_users_email_unique": {
|
|
520
548
|
"name": "byline_admin_users_email_unique",
|
|
521
549
|
"nullsNotDistinct": false,
|
|
522
|
-
"columns": [
|
|
550
|
+
"columns": [
|
|
551
|
+
"email"
|
|
552
|
+
]
|
|
523
553
|
}
|
|
524
554
|
},
|
|
525
555
|
"policies": {},
|
|
@@ -664,8 +694,12 @@
|
|
|
664
694
|
"name": "byline_store_boolean_document_version_id_byline_document_versions_id_fk",
|
|
665
695
|
"tableFrom": "byline_store_boolean",
|
|
666
696
|
"tableTo": "byline_document_versions",
|
|
667
|
-
"columnsFrom": [
|
|
668
|
-
|
|
697
|
+
"columnsFrom": [
|
|
698
|
+
"document_version_id"
|
|
699
|
+
],
|
|
700
|
+
"columnsTo": [
|
|
701
|
+
"id"
|
|
702
|
+
],
|
|
669
703
|
"onDelete": "cascade",
|
|
670
704
|
"onUpdate": "no action"
|
|
671
705
|
},
|
|
@@ -673,8 +707,12 @@
|
|
|
673
707
|
"name": "byline_store_boolean_collection_id_byline_collections_id_fk",
|
|
674
708
|
"tableFrom": "byline_store_boolean",
|
|
675
709
|
"tableTo": "byline_collections",
|
|
676
|
-
"columnsFrom": [
|
|
677
|
-
|
|
710
|
+
"columnsFrom": [
|
|
711
|
+
"collection_id"
|
|
712
|
+
],
|
|
713
|
+
"columnsTo": [
|
|
714
|
+
"id"
|
|
715
|
+
],
|
|
678
716
|
"onDelete": "cascade",
|
|
679
717
|
"onUpdate": "no action"
|
|
680
718
|
}
|
|
@@ -684,7 +722,11 @@
|
|
|
684
722
|
"unique_boolean_field": {
|
|
685
723
|
"name": "unique_boolean_field",
|
|
686
724
|
"nullsNotDistinct": false,
|
|
687
|
-
"columns": [
|
|
725
|
+
"columns": [
|
|
726
|
+
"document_version_id",
|
|
727
|
+
"field_path",
|
|
728
|
+
"locale"
|
|
729
|
+
]
|
|
688
730
|
}
|
|
689
731
|
},
|
|
690
732
|
"policies": {},
|
|
@@ -760,7 +802,9 @@
|
|
|
760
802
|
"byline_collections_path_unique": {
|
|
761
803
|
"name": "byline_collections_path_unique",
|
|
762
804
|
"nullsNotDistinct": false,
|
|
763
|
-
"columns": [
|
|
805
|
+
"columns": [
|
|
806
|
+
"path"
|
|
807
|
+
]
|
|
764
808
|
}
|
|
765
809
|
},
|
|
766
810
|
"policies": {},
|
|
@@ -932,8 +976,12 @@
|
|
|
932
976
|
"name": "byline_store_datetime_document_version_id_byline_document_versions_id_fk",
|
|
933
977
|
"tableFrom": "byline_store_datetime",
|
|
934
978
|
"tableTo": "byline_document_versions",
|
|
935
|
-
"columnsFrom": [
|
|
936
|
-
|
|
979
|
+
"columnsFrom": [
|
|
980
|
+
"document_version_id"
|
|
981
|
+
],
|
|
982
|
+
"columnsTo": [
|
|
983
|
+
"id"
|
|
984
|
+
],
|
|
937
985
|
"onDelete": "cascade",
|
|
938
986
|
"onUpdate": "no action"
|
|
939
987
|
},
|
|
@@ -941,8 +989,12 @@
|
|
|
941
989
|
"name": "byline_store_datetime_collection_id_byline_collections_id_fk",
|
|
942
990
|
"tableFrom": "byline_store_datetime",
|
|
943
991
|
"tableTo": "byline_collections",
|
|
944
|
-
"columnsFrom": [
|
|
945
|
-
|
|
992
|
+
"columnsFrom": [
|
|
993
|
+
"collection_id"
|
|
994
|
+
],
|
|
995
|
+
"columnsTo": [
|
|
996
|
+
"id"
|
|
997
|
+
],
|
|
946
998
|
"onDelete": "cascade",
|
|
947
999
|
"onUpdate": "no action"
|
|
948
1000
|
}
|
|
@@ -952,7 +1004,123 @@
|
|
|
952
1004
|
"unique_datetime_field": {
|
|
953
1005
|
"name": "unique_datetime_field",
|
|
954
1006
|
"nullsNotDistinct": false,
|
|
955
|
-
"columns": [
|
|
1007
|
+
"columns": [
|
|
1008
|
+
"document_version_id",
|
|
1009
|
+
"field_path",
|
|
1010
|
+
"locale"
|
|
1011
|
+
]
|
|
1012
|
+
}
|
|
1013
|
+
},
|
|
1014
|
+
"policies": {},
|
|
1015
|
+
"checkConstraints": {},
|
|
1016
|
+
"isRLSEnabled": false
|
|
1017
|
+
},
|
|
1018
|
+
"public.byline_document_paths": {
|
|
1019
|
+
"name": "byline_document_paths",
|
|
1020
|
+
"schema": "",
|
|
1021
|
+
"columns": {
|
|
1022
|
+
"document_id": {
|
|
1023
|
+
"name": "document_id",
|
|
1024
|
+
"type": "uuid",
|
|
1025
|
+
"primaryKey": false,
|
|
1026
|
+
"notNull": true
|
|
1027
|
+
},
|
|
1028
|
+
"locale": {
|
|
1029
|
+
"name": "locale",
|
|
1030
|
+
"type": "varchar(10)",
|
|
1031
|
+
"primaryKey": false,
|
|
1032
|
+
"notNull": true
|
|
1033
|
+
},
|
|
1034
|
+
"collection_id": {
|
|
1035
|
+
"name": "collection_id",
|
|
1036
|
+
"type": "uuid",
|
|
1037
|
+
"primaryKey": false,
|
|
1038
|
+
"notNull": true
|
|
1039
|
+
},
|
|
1040
|
+
"path": {
|
|
1041
|
+
"name": "path",
|
|
1042
|
+
"type": "varchar(255)",
|
|
1043
|
+
"primaryKey": false,
|
|
1044
|
+
"notNull": true
|
|
1045
|
+
},
|
|
1046
|
+
"created_at": {
|
|
1047
|
+
"name": "created_at",
|
|
1048
|
+
"type": "timestamp",
|
|
1049
|
+
"primaryKey": false,
|
|
1050
|
+
"notNull": false,
|
|
1051
|
+
"default": "now()"
|
|
1052
|
+
},
|
|
1053
|
+
"updated_at": {
|
|
1054
|
+
"name": "updated_at",
|
|
1055
|
+
"type": "timestamp",
|
|
1056
|
+
"primaryKey": false,
|
|
1057
|
+
"notNull": false,
|
|
1058
|
+
"default": "now()"
|
|
1059
|
+
}
|
|
1060
|
+
},
|
|
1061
|
+
"indexes": {
|
|
1062
|
+
"idx_document_paths_document_id": {
|
|
1063
|
+
"name": "idx_document_paths_document_id",
|
|
1064
|
+
"columns": [
|
|
1065
|
+
{
|
|
1066
|
+
"expression": "document_id",
|
|
1067
|
+
"isExpression": false,
|
|
1068
|
+
"asc": true,
|
|
1069
|
+
"nulls": "last"
|
|
1070
|
+
}
|
|
1071
|
+
],
|
|
1072
|
+
"isUnique": false,
|
|
1073
|
+
"concurrently": false,
|
|
1074
|
+
"method": "btree",
|
|
1075
|
+
"with": {}
|
|
1076
|
+
}
|
|
1077
|
+
},
|
|
1078
|
+
"foreignKeys": {
|
|
1079
|
+
"byline_document_paths_document_id_byline_documents_id_fk": {
|
|
1080
|
+
"name": "byline_document_paths_document_id_byline_documents_id_fk",
|
|
1081
|
+
"tableFrom": "byline_document_paths",
|
|
1082
|
+
"tableTo": "byline_documents",
|
|
1083
|
+
"columnsFrom": [
|
|
1084
|
+
"document_id"
|
|
1085
|
+
],
|
|
1086
|
+
"columnsTo": [
|
|
1087
|
+
"id"
|
|
1088
|
+
],
|
|
1089
|
+
"onDelete": "cascade",
|
|
1090
|
+
"onUpdate": "no action"
|
|
1091
|
+
},
|
|
1092
|
+
"byline_document_paths_collection_id_byline_collections_id_fk": {
|
|
1093
|
+
"name": "byline_document_paths_collection_id_byline_collections_id_fk",
|
|
1094
|
+
"tableFrom": "byline_document_paths",
|
|
1095
|
+
"tableTo": "byline_collections",
|
|
1096
|
+
"columnsFrom": [
|
|
1097
|
+
"collection_id"
|
|
1098
|
+
],
|
|
1099
|
+
"columnsTo": [
|
|
1100
|
+
"id"
|
|
1101
|
+
],
|
|
1102
|
+
"onDelete": "cascade",
|
|
1103
|
+
"onUpdate": "no action"
|
|
1104
|
+
}
|
|
1105
|
+
},
|
|
1106
|
+
"compositePrimaryKeys": {},
|
|
1107
|
+
"uniqueConstraints": {
|
|
1108
|
+
"unique_document_paths_document_locale": {
|
|
1109
|
+
"name": "unique_document_paths_document_locale",
|
|
1110
|
+
"nullsNotDistinct": false,
|
|
1111
|
+
"columns": [
|
|
1112
|
+
"document_id",
|
|
1113
|
+
"locale"
|
|
1114
|
+
]
|
|
1115
|
+
},
|
|
1116
|
+
"idx_document_paths_collection_locale_path": {
|
|
1117
|
+
"name": "idx_document_paths_collection_locale_path",
|
|
1118
|
+
"nullsNotDistinct": false,
|
|
1119
|
+
"columns": [
|
|
1120
|
+
"collection_id",
|
|
1121
|
+
"locale",
|
|
1122
|
+
"path"
|
|
1123
|
+
]
|
|
956
1124
|
}
|
|
957
1125
|
},
|
|
958
1126
|
"policies": {},
|
|
@@ -1020,8 +1188,12 @@
|
|
|
1020
1188
|
"name": "byline_document_relationships_parent_document_id_byline_documents_id_fk",
|
|
1021
1189
|
"tableFrom": "byline_document_relationships",
|
|
1022
1190
|
"tableTo": "byline_documents",
|
|
1023
|
-
"columnsFrom": [
|
|
1024
|
-
|
|
1191
|
+
"columnsFrom": [
|
|
1192
|
+
"parent_document_id"
|
|
1193
|
+
],
|
|
1194
|
+
"columnsTo": [
|
|
1195
|
+
"id"
|
|
1196
|
+
],
|
|
1025
1197
|
"onDelete": "cascade",
|
|
1026
1198
|
"onUpdate": "no action"
|
|
1027
1199
|
},
|
|
@@ -1029,8 +1201,12 @@
|
|
|
1029
1201
|
"name": "byline_document_relationships_child_document_id_byline_documents_id_fk",
|
|
1030
1202
|
"tableFrom": "byline_document_relationships",
|
|
1031
1203
|
"tableTo": "byline_documents",
|
|
1032
|
-
"columnsFrom": [
|
|
1033
|
-
|
|
1204
|
+
"columnsFrom": [
|
|
1205
|
+
"child_document_id"
|
|
1206
|
+
],
|
|
1207
|
+
"columnsTo": [
|
|
1208
|
+
"id"
|
|
1209
|
+
],
|
|
1034
1210
|
"onDelete": "cascade",
|
|
1035
1211
|
"onUpdate": "no action"
|
|
1036
1212
|
}
|
|
@@ -1040,7 +1216,10 @@
|
|
|
1040
1216
|
"byline_document_relationships_parent_document_id_child_document_id_unique": {
|
|
1041
1217
|
"name": "byline_document_relationships_parent_document_id_child_document_id_unique",
|
|
1042
1218
|
"nullsNotDistinct": false,
|
|
1043
|
-
"columns": [
|
|
1219
|
+
"columns": [
|
|
1220
|
+
"parent_document_id",
|
|
1221
|
+
"child_document_id"
|
|
1222
|
+
]
|
|
1044
1223
|
}
|
|
1045
1224
|
},
|
|
1046
1225
|
"policies": {},
|
|
@@ -1075,12 +1254,6 @@
|
|
|
1075
1254
|
"primaryKey": false,
|
|
1076
1255
|
"notNull": true
|
|
1077
1256
|
},
|
|
1078
|
-
"path": {
|
|
1079
|
-
"name": "path",
|
|
1080
|
-
"type": "varchar(255)",
|
|
1081
|
-
"primaryKey": false,
|
|
1082
|
-
"notNull": true
|
|
1083
|
-
},
|
|
1084
1257
|
"doc": {
|
|
1085
1258
|
"name": "doc",
|
|
1086
1259
|
"type": "jsonb",
|
|
@@ -1151,33 +1324,6 @@
|
|
|
1151
1324
|
"method": "btree",
|
|
1152
1325
|
"with": {}
|
|
1153
1326
|
},
|
|
1154
|
-
"idx_documents_collection_path_deleted": {
|
|
1155
|
-
"name": "idx_documents_collection_path_deleted",
|
|
1156
|
-
"columns": [
|
|
1157
|
-
{
|
|
1158
|
-
"expression": "collection_id",
|
|
1159
|
-
"isExpression": false,
|
|
1160
|
-
"asc": true,
|
|
1161
|
-
"nulls": "last"
|
|
1162
|
-
},
|
|
1163
|
-
{
|
|
1164
|
-
"expression": "path",
|
|
1165
|
-
"isExpression": false,
|
|
1166
|
-
"asc": true,
|
|
1167
|
-
"nulls": "last"
|
|
1168
|
-
},
|
|
1169
|
-
{
|
|
1170
|
-
"expression": "is_deleted",
|
|
1171
|
-
"isExpression": false,
|
|
1172
|
-
"asc": true,
|
|
1173
|
-
"nulls": "last"
|
|
1174
|
-
}
|
|
1175
|
-
],
|
|
1176
|
-
"isUnique": false,
|
|
1177
|
-
"concurrently": false,
|
|
1178
|
-
"method": "btree",
|
|
1179
|
-
"with": {}
|
|
1180
|
-
},
|
|
1181
1327
|
"idx_documents_collection_document_deleted": {
|
|
1182
1328
|
"name": "idx_documents_collection_document_deleted",
|
|
1183
1329
|
"columns": [
|
|
@@ -1295,8 +1441,12 @@
|
|
|
1295
1441
|
"name": "byline_document_versions_document_id_byline_documents_id_fk",
|
|
1296
1442
|
"tableFrom": "byline_document_versions",
|
|
1297
1443
|
"tableTo": "byline_documents",
|
|
1298
|
-
"columnsFrom": [
|
|
1299
|
-
|
|
1444
|
+
"columnsFrom": [
|
|
1445
|
+
"document_id"
|
|
1446
|
+
],
|
|
1447
|
+
"columnsTo": [
|
|
1448
|
+
"id"
|
|
1449
|
+
],
|
|
1300
1450
|
"onDelete": "cascade",
|
|
1301
1451
|
"onUpdate": "no action"
|
|
1302
1452
|
},
|
|
@@ -1304,8 +1454,12 @@
|
|
|
1304
1454
|
"name": "byline_document_versions_collection_id_byline_collections_id_fk",
|
|
1305
1455
|
"tableFrom": "byline_document_versions",
|
|
1306
1456
|
"tableTo": "byline_collections",
|
|
1307
|
-
"columnsFrom": [
|
|
1308
|
-
|
|
1457
|
+
"columnsFrom": [
|
|
1458
|
+
"collection_id"
|
|
1459
|
+
],
|
|
1460
|
+
"columnsTo": [
|
|
1461
|
+
"id"
|
|
1462
|
+
],
|
|
1309
1463
|
"onDelete": "cascade",
|
|
1310
1464
|
"onUpdate": "no action"
|
|
1311
1465
|
}
|
|
@@ -1369,8 +1523,12 @@
|
|
|
1369
1523
|
"name": "byline_documents_collection_id_byline_collections_id_fk",
|
|
1370
1524
|
"tableFrom": "byline_documents",
|
|
1371
1525
|
"tableTo": "byline_collections",
|
|
1372
|
-
"columnsFrom": [
|
|
1373
|
-
|
|
1526
|
+
"columnsFrom": [
|
|
1527
|
+
"collection_id"
|
|
1528
|
+
],
|
|
1529
|
+
"columnsTo": [
|
|
1530
|
+
"id"
|
|
1531
|
+
],
|
|
1374
1532
|
"onDelete": "cascade",
|
|
1375
1533
|
"onUpdate": "no action"
|
|
1376
1534
|
}
|
|
@@ -1527,6 +1685,12 @@
|
|
|
1527
1685
|
"primaryKey": false,
|
|
1528
1686
|
"notNull": false,
|
|
1529
1687
|
"default": false
|
|
1688
|
+
},
|
|
1689
|
+
"variants": {
|
|
1690
|
+
"name": "variants",
|
|
1691
|
+
"type": "jsonb",
|
|
1692
|
+
"primaryKey": false,
|
|
1693
|
+
"notNull": false
|
|
1530
1694
|
}
|
|
1531
1695
|
},
|
|
1532
1696
|
"indexes": {
|
|
@@ -1647,8 +1811,12 @@
|
|
|
1647
1811
|
"name": "byline_store_file_document_version_id_byline_document_versions_id_fk",
|
|
1648
1812
|
"tableFrom": "byline_store_file",
|
|
1649
1813
|
"tableTo": "byline_document_versions",
|
|
1650
|
-
"columnsFrom": [
|
|
1651
|
-
|
|
1814
|
+
"columnsFrom": [
|
|
1815
|
+
"document_version_id"
|
|
1816
|
+
],
|
|
1817
|
+
"columnsTo": [
|
|
1818
|
+
"id"
|
|
1819
|
+
],
|
|
1652
1820
|
"onDelete": "cascade",
|
|
1653
1821
|
"onUpdate": "no action"
|
|
1654
1822
|
},
|
|
@@ -1656,8 +1824,12 @@
|
|
|
1656
1824
|
"name": "byline_store_file_collection_id_byline_collections_id_fk",
|
|
1657
1825
|
"tableFrom": "byline_store_file",
|
|
1658
1826
|
"tableTo": "byline_collections",
|
|
1659
|
-
"columnsFrom": [
|
|
1660
|
-
|
|
1827
|
+
"columnsFrom": [
|
|
1828
|
+
"collection_id"
|
|
1829
|
+
],
|
|
1830
|
+
"columnsTo": [
|
|
1831
|
+
"id"
|
|
1832
|
+
],
|
|
1661
1833
|
"onDelete": "cascade",
|
|
1662
1834
|
"onUpdate": "no action"
|
|
1663
1835
|
}
|
|
@@ -1667,7 +1839,11 @@
|
|
|
1667
1839
|
"unique_file_field": {
|
|
1668
1840
|
"name": "unique_file_field",
|
|
1669
1841
|
"nullsNotDistinct": false,
|
|
1670
|
-
"columns": [
|
|
1842
|
+
"columns": [
|
|
1843
|
+
"document_version_id",
|
|
1844
|
+
"field_path",
|
|
1845
|
+
"locale"
|
|
1846
|
+
]
|
|
1671
1847
|
}
|
|
1672
1848
|
},
|
|
1673
1849
|
"policies": {},
|
|
@@ -1806,8 +1982,12 @@
|
|
|
1806
1982
|
"name": "byline_store_json_document_version_id_byline_document_versions_id_fk",
|
|
1807
1983
|
"tableFrom": "byline_store_json",
|
|
1808
1984
|
"tableTo": "byline_document_versions",
|
|
1809
|
-
"columnsFrom": [
|
|
1810
|
-
|
|
1985
|
+
"columnsFrom": [
|
|
1986
|
+
"document_version_id"
|
|
1987
|
+
],
|
|
1988
|
+
"columnsTo": [
|
|
1989
|
+
"id"
|
|
1990
|
+
],
|
|
1811
1991
|
"onDelete": "cascade",
|
|
1812
1992
|
"onUpdate": "no action"
|
|
1813
1993
|
},
|
|
@@ -1815,8 +1995,12 @@
|
|
|
1815
1995
|
"name": "byline_store_json_collection_id_byline_collections_id_fk",
|
|
1816
1996
|
"tableFrom": "byline_store_json",
|
|
1817
1997
|
"tableTo": "byline_collections",
|
|
1818
|
-
"columnsFrom": [
|
|
1819
|
-
|
|
1998
|
+
"columnsFrom": [
|
|
1999
|
+
"collection_id"
|
|
2000
|
+
],
|
|
2001
|
+
"columnsTo": [
|
|
2002
|
+
"id"
|
|
2003
|
+
],
|
|
1820
2004
|
"onDelete": "cascade",
|
|
1821
2005
|
"onUpdate": "no action"
|
|
1822
2006
|
}
|
|
@@ -1826,7 +2010,11 @@
|
|
|
1826
2010
|
"unique_json_field": {
|
|
1827
2011
|
"name": "unique_json_field",
|
|
1828
2012
|
"nullsNotDistinct": false,
|
|
1829
|
-
"columns": [
|
|
2013
|
+
"columns": [
|
|
2014
|
+
"document_version_id",
|
|
2015
|
+
"field_path",
|
|
2016
|
+
"locale"
|
|
2017
|
+
]
|
|
1830
2018
|
}
|
|
1831
2019
|
},
|
|
1832
2020
|
"policies": {},
|
|
@@ -1964,8 +2152,12 @@
|
|
|
1964
2152
|
"name": "byline_store_meta_document_version_id_byline_document_versions_id_fk",
|
|
1965
2153
|
"tableFrom": "byline_store_meta",
|
|
1966
2154
|
"tableTo": "byline_document_versions",
|
|
1967
|
-
"columnsFrom": [
|
|
1968
|
-
|
|
2155
|
+
"columnsFrom": [
|
|
2156
|
+
"document_version_id"
|
|
2157
|
+
],
|
|
2158
|
+
"columnsTo": [
|
|
2159
|
+
"id"
|
|
2160
|
+
],
|
|
1969
2161
|
"onDelete": "cascade",
|
|
1970
2162
|
"onUpdate": "no action"
|
|
1971
2163
|
},
|
|
@@ -1973,8 +2165,12 @@
|
|
|
1973
2165
|
"name": "byline_store_meta_collection_id_byline_collections_id_fk",
|
|
1974
2166
|
"tableFrom": "byline_store_meta",
|
|
1975
2167
|
"tableTo": "byline_collections",
|
|
1976
|
-
"columnsFrom": [
|
|
1977
|
-
|
|
2168
|
+
"columnsFrom": [
|
|
2169
|
+
"collection_id"
|
|
2170
|
+
],
|
|
2171
|
+
"columnsTo": [
|
|
2172
|
+
"id"
|
|
2173
|
+
],
|
|
1978
2174
|
"onDelete": "cascade",
|
|
1979
2175
|
"onUpdate": "no action"
|
|
1980
2176
|
}
|
|
@@ -1984,7 +2180,11 @@
|
|
|
1984
2180
|
"unique_meta_node": {
|
|
1985
2181
|
"name": "unique_meta_node",
|
|
1986
2182
|
"nullsNotDistinct": false,
|
|
1987
|
-
"columns": [
|
|
2183
|
+
"columns": [
|
|
2184
|
+
"document_version_id",
|
|
2185
|
+
"type",
|
|
2186
|
+
"path"
|
|
2187
|
+
]
|
|
1988
2188
|
}
|
|
1989
2189
|
},
|
|
1990
2190
|
"policies": {},
|
|
@@ -2171,8 +2371,12 @@
|
|
|
2171
2371
|
"name": "byline_store_numeric_document_version_id_byline_document_versions_id_fk",
|
|
2172
2372
|
"tableFrom": "byline_store_numeric",
|
|
2173
2373
|
"tableTo": "byline_document_versions",
|
|
2174
|
-
"columnsFrom": [
|
|
2175
|
-
|
|
2374
|
+
"columnsFrom": [
|
|
2375
|
+
"document_version_id"
|
|
2376
|
+
],
|
|
2377
|
+
"columnsTo": [
|
|
2378
|
+
"id"
|
|
2379
|
+
],
|
|
2176
2380
|
"onDelete": "cascade",
|
|
2177
2381
|
"onUpdate": "no action"
|
|
2178
2382
|
},
|
|
@@ -2180,8 +2384,12 @@
|
|
|
2180
2384
|
"name": "byline_store_numeric_collection_id_byline_collections_id_fk",
|
|
2181
2385
|
"tableFrom": "byline_store_numeric",
|
|
2182
2386
|
"tableTo": "byline_collections",
|
|
2183
|
-
"columnsFrom": [
|
|
2184
|
-
|
|
2387
|
+
"columnsFrom": [
|
|
2388
|
+
"collection_id"
|
|
2389
|
+
],
|
|
2390
|
+
"columnsTo": [
|
|
2391
|
+
"id"
|
|
2392
|
+
],
|
|
2185
2393
|
"onDelete": "cascade",
|
|
2186
2394
|
"onUpdate": "no action"
|
|
2187
2395
|
}
|
|
@@ -2191,7 +2399,11 @@
|
|
|
2191
2399
|
"unique_numeric_field": {
|
|
2192
2400
|
"name": "unique_numeric_field",
|
|
2193
2401
|
"nullsNotDistinct": false,
|
|
2194
|
-
"columns": [
|
|
2402
|
+
"columns": [
|
|
2403
|
+
"document_version_id",
|
|
2404
|
+
"field_path",
|
|
2405
|
+
"locale"
|
|
2406
|
+
]
|
|
2195
2407
|
}
|
|
2196
2408
|
},
|
|
2197
2409
|
"policies": {},
|
|
@@ -2380,8 +2592,12 @@
|
|
|
2380
2592
|
"name": "byline_store_relation_document_version_id_byline_document_versions_id_fk",
|
|
2381
2593
|
"tableFrom": "byline_store_relation",
|
|
2382
2594
|
"tableTo": "byline_document_versions",
|
|
2383
|
-
"columnsFrom": [
|
|
2384
|
-
|
|
2595
|
+
"columnsFrom": [
|
|
2596
|
+
"document_version_id"
|
|
2597
|
+
],
|
|
2598
|
+
"columnsTo": [
|
|
2599
|
+
"id"
|
|
2600
|
+
],
|
|
2385
2601
|
"onDelete": "cascade",
|
|
2386
2602
|
"onUpdate": "no action"
|
|
2387
2603
|
},
|
|
@@ -2389,8 +2605,12 @@
|
|
|
2389
2605
|
"name": "byline_store_relation_collection_id_byline_collections_id_fk",
|
|
2390
2606
|
"tableFrom": "byline_store_relation",
|
|
2391
2607
|
"tableTo": "byline_collections",
|
|
2392
|
-
"columnsFrom": [
|
|
2393
|
-
|
|
2608
|
+
"columnsFrom": [
|
|
2609
|
+
"collection_id"
|
|
2610
|
+
],
|
|
2611
|
+
"columnsTo": [
|
|
2612
|
+
"id"
|
|
2613
|
+
],
|
|
2394
2614
|
"onDelete": "cascade",
|
|
2395
2615
|
"onUpdate": "no action"
|
|
2396
2616
|
},
|
|
@@ -2398,8 +2618,12 @@
|
|
|
2398
2618
|
"name": "byline_store_relation_target_document_id_byline_documents_id_fk",
|
|
2399
2619
|
"tableFrom": "byline_store_relation",
|
|
2400
2620
|
"tableTo": "byline_documents",
|
|
2401
|
-
"columnsFrom": [
|
|
2402
|
-
|
|
2621
|
+
"columnsFrom": [
|
|
2622
|
+
"target_document_id"
|
|
2623
|
+
],
|
|
2624
|
+
"columnsTo": [
|
|
2625
|
+
"id"
|
|
2626
|
+
],
|
|
2403
2627
|
"onDelete": "no action",
|
|
2404
2628
|
"onUpdate": "no action"
|
|
2405
2629
|
},
|
|
@@ -2407,8 +2631,12 @@
|
|
|
2407
2631
|
"name": "byline_store_relation_target_collection_id_byline_collections_id_fk",
|
|
2408
2632
|
"tableFrom": "byline_store_relation",
|
|
2409
2633
|
"tableTo": "byline_collections",
|
|
2410
|
-
"columnsFrom": [
|
|
2411
|
-
|
|
2634
|
+
"columnsFrom": [
|
|
2635
|
+
"target_collection_id"
|
|
2636
|
+
],
|
|
2637
|
+
"columnsTo": [
|
|
2638
|
+
"id"
|
|
2639
|
+
],
|
|
2412
2640
|
"onDelete": "no action",
|
|
2413
2641
|
"onUpdate": "no action"
|
|
2414
2642
|
}
|
|
@@ -2418,7 +2646,11 @@
|
|
|
2418
2646
|
"unique_relation_field": {
|
|
2419
2647
|
"name": "unique_relation_field",
|
|
2420
2648
|
"nullsNotDistinct": false,
|
|
2421
|
-
"columns": [
|
|
2649
|
+
"columns": [
|
|
2650
|
+
"document_version_id",
|
|
2651
|
+
"field_path",
|
|
2652
|
+
"locale"
|
|
2653
|
+
]
|
|
2422
2654
|
}
|
|
2423
2655
|
},
|
|
2424
2656
|
"policies": {},
|
|
@@ -2578,8 +2810,12 @@
|
|
|
2578
2810
|
"name": "byline_store_text_document_version_id_byline_document_versions_id_fk",
|
|
2579
2811
|
"tableFrom": "byline_store_text",
|
|
2580
2812
|
"tableTo": "byline_document_versions",
|
|
2581
|
-
"columnsFrom": [
|
|
2582
|
-
|
|
2813
|
+
"columnsFrom": [
|
|
2814
|
+
"document_version_id"
|
|
2815
|
+
],
|
|
2816
|
+
"columnsTo": [
|
|
2817
|
+
"id"
|
|
2818
|
+
],
|
|
2583
2819
|
"onDelete": "cascade",
|
|
2584
2820
|
"onUpdate": "no action"
|
|
2585
2821
|
},
|
|
@@ -2587,8 +2823,12 @@
|
|
|
2587
2823
|
"name": "byline_store_text_collection_id_byline_collections_id_fk",
|
|
2588
2824
|
"tableFrom": "byline_store_text",
|
|
2589
2825
|
"tableTo": "byline_collections",
|
|
2590
|
-
"columnsFrom": [
|
|
2591
|
-
|
|
2826
|
+
"columnsFrom": [
|
|
2827
|
+
"collection_id"
|
|
2828
|
+
],
|
|
2829
|
+
"columnsTo": [
|
|
2830
|
+
"id"
|
|
2831
|
+
],
|
|
2592
2832
|
"onDelete": "cascade",
|
|
2593
2833
|
"onUpdate": "no action"
|
|
2594
2834
|
}
|
|
@@ -2598,7 +2838,11 @@
|
|
|
2598
2838
|
"unique_text_field": {
|
|
2599
2839
|
"name": "unique_text_field",
|
|
2600
2840
|
"nullsNotDistinct": false,
|
|
2601
|
-
"columns": [
|
|
2841
|
+
"columns": [
|
|
2842
|
+
"document_version_id",
|
|
2843
|
+
"field_path",
|
|
2844
|
+
"locale"
|
|
2845
|
+
]
|
|
2602
2846
|
}
|
|
2603
2847
|
},
|
|
2604
2848
|
"policies": {},
|
|
@@ -2638,12 +2882,6 @@
|
|
|
2638
2882
|
"primaryKey": false,
|
|
2639
2883
|
"notNull": true
|
|
2640
2884
|
},
|
|
2641
|
-
"path": {
|
|
2642
|
-
"name": "path",
|
|
2643
|
-
"type": "varchar(255)",
|
|
2644
|
-
"primaryKey": false,
|
|
2645
|
-
"notNull": true
|
|
2646
|
-
},
|
|
2647
2885
|
"event_type": {
|
|
2648
2886
|
"name": "event_type",
|
|
2649
2887
|
"type": "varchar(20)",
|
|
@@ -2692,7 +2930,7 @@
|
|
|
2692
2930
|
"notNull": false
|
|
2693
2931
|
}
|
|
2694
2932
|
},
|
|
2695
|
-
"definition": "with \"sq\" as (select \"id\", \"document_id\", \"collection_id\", \"collection_version\", \"
|
|
2933
|
+
"definition": "with \"sq\" as (select \"id\", \"document_id\", \"collection_id\", \"collection_version\", \"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\", \"event_type\", \"status\", \"is_deleted\", \"created_at\", \"updated_at\", \"created_by\", \"change_summary\" from \"sq\" where \"rn\" = 1",
|
|
2696
2934
|
"name": "byline_current_documents",
|
|
2697
2935
|
"schema": "public",
|
|
2698
2936
|
"isExisting": false,
|
|
@@ -2724,12 +2962,6 @@
|
|
|
2724
2962
|
"primaryKey": false,
|
|
2725
2963
|
"notNull": true
|
|
2726
2964
|
},
|
|
2727
|
-
"path": {
|
|
2728
|
-
"name": "path",
|
|
2729
|
-
"type": "varchar(255)",
|
|
2730
|
-
"primaryKey": false,
|
|
2731
|
-
"notNull": true
|
|
2732
|
-
},
|
|
2733
2965
|
"event_type": {
|
|
2734
2966
|
"name": "event_type",
|
|
2735
2967
|
"type": "varchar(20)",
|
|
@@ -2778,7 +3010,7 @@
|
|
|
2778
3010
|
"notNull": false
|
|
2779
3011
|
}
|
|
2780
3012
|
},
|
|
2781
|
-
"definition": "with \"sq\" as (select \"id\", \"document_id\", \"collection_id\", \"collection_version\", \"
|
|
3013
|
+
"definition": "with \"sq\" as (select \"id\", \"document_id\", \"collection_id\", \"collection_version\", \"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\", \"event_type\", \"status\", \"is_deleted\", \"created_at\", \"updated_at\", \"created_by\", \"change_summary\" from \"sq\" where \"rn\" = 1",
|
|
2782
3014
|
"name": "byline_current_published_documents",
|
|
2783
3015
|
"schema": "public",
|
|
2784
3016
|
"isExisting": false,
|
|
@@ -2790,4 +3022,4 @@
|
|
|
2790
3022
|
"schemas": {},
|
|
2791
3023
|
"tables": {}
|
|
2792
3024
|
}
|
|
2793
|
-
}
|
|
3025
|
+
}
|
|
@@ -5,16 +5,9 @@
|
|
|
5
5
|
{
|
|
6
6
|
"idx": 0,
|
|
7
7
|
"version": "7",
|
|
8
|
-
"when":
|
|
9
|
-
"tag": "
|
|
10
|
-
"breakpoints": true
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"idx": 1,
|
|
14
|
-
"version": "7",
|
|
15
|
-
"when": 1777600377018,
|
|
16
|
-
"tag": "0001_sudden_phantom_reporter",
|
|
8
|
+
"when": 1778388153432,
|
|
9
|
+
"tag": "0000_hard_madame_hydra",
|
|
17
10
|
"breakpoints": true
|
|
18
11
|
}
|
|
19
12
|
]
|
|
20
|
-
}
|
|
13
|
+
}
|