@storyshelf/db-mysql 0.6.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/dist/ddl.d.mts +1 -1
- package/dist/ddl.mjs +381 -138
- package/dist/ddl.mjs.map +1 -1
- package/dist/drizzle-factory-mysql.mjs +7 -1
- package/dist/drizzle-factory-mysql.mjs.map +1 -1
- package/dist/foreign-keys.mjs +339 -0
- package/dist/foreign-keys.mjs.map +1 -0
- package/dist/index.mjs +10 -5
- package/dist/index.mjs.map +1 -1
- package/dist/migrate.mjs +300 -72
- package/dist/migrate.mjs.map +1 -1
- package/dist/schema/baseline.d.mts +60 -6
- package/dist/schema/baseline.mjs +6 -2
- package/dist/schema/baseline.mjs.map +1 -1
- package/dist/schema/{status-config.d.mts → build-component.d.mts} +46 -39
- package/dist/schema/build-component.mjs +26 -0
- package/dist/schema/build-component.mjs.map +1 -0
- package/dist/schema/build-review.d.mts +118 -0
- package/dist/schema/build-review.mjs +24 -0
- package/dist/schema/build-review.mjs.map +1 -0
- package/dist/schema/build.d.mts +44 -8
- package/dist/schema/build.mjs +5 -1
- package/dist/schema/build.mjs.map +1 -1
- package/dist/schema/capture-attempt.d.mts +18 -18
- package/dist/schema/capture-attempt.mjs +2 -1
- package/dist/schema/capture-attempt.mjs.map +1 -1
- package/dist/schema/capture-job.d.mts +330 -0
- package/dist/schema/capture-job.mjs +57 -0
- package/dist/schema/capture-job.mjs.map +1 -0
- package/dist/schema/capture-shard.d.mts +257 -0
- package/dist/schema/capture-shard.mjs +41 -0
- package/dist/schema/capture-shard.mjs.map +1 -0
- package/dist/schema/comment.d.mts +24 -6
- package/dist/schema/comment.mjs +5 -3
- package/dist/schema/comment.mjs.map +1 -1
- package/dist/schema/connection.d.mts +173 -0
- package/dist/schema/connection.mjs +36 -0
- package/dist/schema/connection.mjs.map +1 -0
- package/dist/schema/content-refs.d.mts +6 -6
- package/dist/schema/content-refs.mjs +2 -1
- package/dist/schema/content-refs.mjs.map +1 -1
- package/dist/schema/datetime.mjs +47 -0
- package/dist/schema/datetime.mjs.map +1 -0
- package/dist/schema/design.d.mts +589 -0
- package/dist/schema/design.mjs +74 -0
- package/dist/schema/design.mjs.map +1 -0
- package/dist/schema/insight.d.mts +633 -0
- package/dist/schema/insight.mjs +69 -0
- package/dist/schema/insight.mjs.map +1 -0
- package/dist/schema/label.d.mts +6 -6
- package/dist/schema/label.mjs +2 -1
- package/dist/schema/label.mjs.map +1 -1
- package/dist/schema/member.d.mts +3 -3
- package/dist/schema/member.mjs +2 -1
- package/dist/schema/member.mjs.map +1 -1
- package/dist/schema/notification.d.mts +45 -9
- package/dist/schema/notification.mjs +7 -1
- package/dist/schema/notification.mjs.map +1 -1
- package/dist/schema/project-group-mapping.d.mts +3 -3
- package/dist/schema/project-group-mapping.mjs +2 -1
- package/dist/schema/project-group-mapping.mjs.map +1 -1
- package/dist/schema/project.d.mts +132 -6
- package/dist/schema/project.mjs +10 -2
- package/dist/schema/project.mjs.map +1 -1
- package/dist/schema/site-setting.d.mts +99 -0
- package/dist/schema/site-setting.mjs +24 -0
- package/dist/schema/site-setting.mjs.map +1 -0
- package/dist/schema/snapshot.d.mts +117 -9
- package/dist/schema/snapshot.mjs +13 -2
- package/dist/schema/snapshot.mjs.map +1 -1
- package/dist/schema/token.d.mts +6 -6
- package/dist/schema/token.mjs +2 -1
- package/dist/schema/token.mjs.map +1 -1
- package/dist/schema/usage.d.mts +267 -0
- package/dist/schema/usage.mjs +37 -0
- package/dist/schema/usage.mjs.map +1 -0
- package/dist/schema/user-invite.d.mts +9 -9
- package/dist/schema/user-invite.mjs +2 -1
- package/dist/schema/user-invite.mjs.map +1 -1
- package/dist/schema/user.d.mts +6 -6
- package/dist/schema/user.mjs +2 -1
- package/dist/schema/user.mjs.map +1 -1
- package/dist/schema/webhook.d.mts +6 -6
- package/dist/schema/webhook.mjs +2 -1
- package/dist/schema/webhook.mjs.map +1 -1
- package/dist/schema.d.mts +24 -3
- package/dist/schema.mjs +25 -4
- package/dist/schema.mjs.map +1 -1
- package/package.json +5 -5
- package/dist/schema/status-config.mjs +0 -26
- package/dist/schema/status-config.mjs.map +0 -1
package/dist/schema/label.d.mts
CHANGED
|
@@ -111,10 +111,10 @@ declare const labelTypes: import("drizzle-orm/mysql-core").MySqlTableWithColumns
|
|
|
111
111
|
createdAt: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
112
112
|
name: "created_at";
|
|
113
113
|
tableName: "label_types";
|
|
114
|
-
dataType: "
|
|
115
|
-
columnType: "
|
|
114
|
+
dataType: "custom";
|
|
115
|
+
columnType: "MySqlCustomColumn";
|
|
116
116
|
data: string;
|
|
117
|
-
driverParam: string
|
|
117
|
+
driverParam: string;
|
|
118
118
|
notNull: true;
|
|
119
119
|
hasDefault: false;
|
|
120
120
|
isPrimaryKey: false;
|
|
@@ -221,10 +221,10 @@ declare const buildLabels: import("drizzle-orm/mysql-core").MySqlTableWithColumn
|
|
|
221
221
|
createdAt: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
222
222
|
name: "created_at";
|
|
223
223
|
tableName: "build_labels";
|
|
224
|
-
dataType: "
|
|
225
|
-
columnType: "
|
|
224
|
+
dataType: "custom";
|
|
225
|
+
columnType: "MySqlCustomColumn";
|
|
226
226
|
data: string;
|
|
227
|
-
driverParam: string
|
|
227
|
+
driverParam: string;
|
|
228
228
|
notNull: true;
|
|
229
229
|
hasDefault: false;
|
|
230
230
|
isPrimaryKey: false;
|
package/dist/schema/label.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { datetime } from "./datetime.mjs";
|
|
4
5
|
import { projects } from "./project.mjs";
|
|
5
6
|
import { builds } from "./build.mjs";
|
|
6
|
-
import {
|
|
7
|
+
import { mysqlTable, text, uniqueIndex } from "drizzle-orm/mysql-core";
|
|
7
8
|
//#region src/schema/label.ts
|
|
8
9
|
/** Narrow `label_types` table definition. */
|
|
9
10
|
const labelTypes = mysqlTable("label_types", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.mjs","names":[],"sources":["../../src/schema/label.ts"],"sourcesContent":["import { mysqlTable, text,
|
|
1
|
+
{"version":3,"file":"label.mjs","names":[],"sources":["../../src/schema/label.ts"],"sourcesContent":["import { mysqlTable, text, uniqueIndex } from \"drizzle-orm/mysql-core\";\nimport { builds } from \"./build.ts\";\nimport { datetime } from \"./datetime.ts\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `label_types` table definition. */\nexport const labelTypes = mysqlTable(\n \"label_types\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n key: text(\"key\").notNull(),\n name: text(\"name\").notNull(),\n linkTemplate: text(\"link_template\"),\n color: text(\"color\"),\n createdAt: datetime(\"created_at\", { mode: \"string\", fsp: 3 }).notNull(),\n },\n (t) => [uniqueIndex(\"label_types_project_key_idx\").on(t.projectId, t.key)],\n);\n\n/** Narrow `build_labels` table definition. */\nexport const buildLabels = mysqlTable(\n \"build_labels\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n buildId: text(\"build_id\")\n .notNull()\n .references(() => builds.id, { onDelete: \"cascade\" }),\n typeKey: text(\"type_key\").notNull(),\n value: text(\"value\").notNull(),\n createdAt: datetime(\"created_at\", { mode: \"string\", fsp: 3 }).notNull(),\n },\n (t) => [uniqueIndex(\"build_labels_build_type_value_idx\").on(t.buildId, t.typeKey, t.value)],\n);\n\n/** A label-type row. */\nexport interface LabelType {\n id: string;\n projectId: string;\n key: string;\n name: string;\n linkTemplate: string | null;\n color: string | null;\n createdAt: string;\n}\n\n/** A build-label row. */\nexport interface BuildLabel {\n id: string;\n projectId: string;\n buildId: string;\n typeKey: string;\n value: string;\n createdAt: string;\n}\n"],"mappings":";;;;;;;;;AAMA,MAAa,aAAa,WACxB,eACA;CACE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,KAAK,KAAK,KAAK,CAAC,CAAC,QAAQ;CACzB,MAAM,KAAK,MAAM,CAAC,CAAC,QAAQ;CAC3B,cAAc,KAAK,eAAe;CAClC,OAAO,KAAK,OAAO;CACnB,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;AACxE,IACC,MAAM,CAAC,YAAY,6BAA6B,CAAC,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,CAAC,CAC3E;;AAGA,MAAa,cAAc,WACzB,gBACA;CACE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,SAAS,KAAK,UAAU,CAAC,CACtB,QAAQ,CAAC,CACT,iBAAiB,OAAO,IAAI,EAAE,UAAU,UAAU,CAAC;CACtD,SAAS,KAAK,UAAU,CAAC,CAAC,QAAQ;CAClC,OAAO,KAAK,OAAO,CAAC,CAAC,QAAQ;CAC7B,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;AACxE,IACC,MAAM,CAAC,YAAY,mCAAmC,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAC5F"}
|
package/dist/schema/member.d.mts
CHANGED
|
@@ -97,10 +97,10 @@ declare const projectMembers: import("drizzle-orm/mysql-core").MySqlTableWithCol
|
|
|
97
97
|
createdAt: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
98
98
|
name: "created_at";
|
|
99
99
|
tableName: "project_members";
|
|
100
|
-
dataType: "
|
|
101
|
-
columnType: "
|
|
100
|
+
dataType: "custom";
|
|
101
|
+
columnType: "MySqlCustomColumn";
|
|
102
102
|
data: string;
|
|
103
|
-
driverParam: string
|
|
103
|
+
driverParam: string;
|
|
104
104
|
notNull: true;
|
|
105
105
|
hasDefault: false;
|
|
106
106
|
isPrimaryKey: false;
|
package/dist/schema/member.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { datetime } from "./datetime.mjs";
|
|
4
5
|
import { projects } from "./project.mjs";
|
|
5
6
|
import { users } from "./user.mjs";
|
|
6
|
-
import {
|
|
7
|
+
import { mysqlTable, text, uniqueIndex } from "drizzle-orm/mysql-core";
|
|
7
8
|
//#region src/schema/member.ts
|
|
8
9
|
/** Narrow `project_members` table definition. */
|
|
9
10
|
const projectMembers = mysqlTable("project_members", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member.mjs","names":[],"sources":["../../src/schema/member.ts"],"sourcesContent":["import type { ProjectRole } from \"@storyshelf/core/types\";\nimport { mysqlTable, text,
|
|
1
|
+
{"version":3,"file":"member.mjs","names":[],"sources":["../../src/schema/member.ts"],"sourcesContent":["import type { ProjectRole } from \"@storyshelf/core/types\";\nimport { mysqlTable, text, uniqueIndex } from \"drizzle-orm/mysql-core\";\nimport { datetime } from \"./datetime.ts\";\nimport { projects } from \"./project.ts\";\nimport { users } from \"./user.ts\";\n\n/** Narrow `project_members` table definition. */\nexport const projectMembers = mysqlTable(\n \"project_members\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n userId: text(\"user_id\")\n .notNull()\n .references(() => users.id, { onDelete: \"cascade\" }),\n role: text(\"role\").$type<ProjectRole>().notNull().default(\"viewer\"),\n source: text(\"source\").notNull().default(\"manual\"),\n createdAt: datetime(\"created_at\", { mode: \"string\", fsp: 3 }).notNull(),\n },\n (t) => [uniqueIndex(\"project_members_project_user_idx\").on(t.projectId, t.userId)],\n);\n\n/** A project-membership row. */\nexport interface ProjectMember {\n id: string;\n projectId: string;\n userId: string;\n role: ProjectRole;\n /** Provenance: `manual` grants vs `oidc:<group>` synced grants. */\n source: string;\n createdAt: string;\n}\n"],"mappings":";;;;;;;;;AAOA,MAAa,iBAAiB,WAC5B,mBACA;CACE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,QAAQ,KAAK,SAAS,CAAC,CACpB,QAAQ,CAAC,CACT,iBAAiB,MAAM,IAAI,EAAE,UAAU,UAAU,CAAC;CACrD,MAAM,KAAK,MAAM,CAAC,CAAC,MAAmB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,QAAQ;CAClE,QAAQ,KAAK,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,QAAQ;CACjD,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;AACxE,IACC,MAAM,CAAC,YAAY,kCAAkC,CAAC,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,CAAC,CACnF"}
|
|
@@ -125,13 +125,47 @@ declare const notificationChannels: import("drizzle-orm/mysql-core").MySqlTableW
|
|
|
125
125
|
identity: undefined;
|
|
126
126
|
generated: undefined;
|
|
127
127
|
}, {}, {}>;
|
|
128
|
+
lastError: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
129
|
+
name: "last_error";
|
|
130
|
+
tableName: "notification_channels";
|
|
131
|
+
dataType: "string";
|
|
132
|
+
columnType: "MySqlText";
|
|
133
|
+
data: string;
|
|
134
|
+
driverParam: string;
|
|
135
|
+
notNull: false;
|
|
136
|
+
hasDefault: false;
|
|
137
|
+
isPrimaryKey: false;
|
|
138
|
+
isAutoincrement: false;
|
|
139
|
+
hasRuntimeDefault: false;
|
|
140
|
+
enumValues: [string, ...string[]];
|
|
141
|
+
baseColumn: never;
|
|
142
|
+
identity: undefined;
|
|
143
|
+
generated: undefined;
|
|
144
|
+
}, {}, {}>;
|
|
145
|
+
lastErrorAt: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
146
|
+
name: "last_error_at";
|
|
147
|
+
tableName: "notification_channels";
|
|
148
|
+
dataType: "custom";
|
|
149
|
+
columnType: "MySqlCustomColumn";
|
|
150
|
+
data: string;
|
|
151
|
+
driverParam: string;
|
|
152
|
+
notNull: false;
|
|
153
|
+
hasDefault: false;
|
|
154
|
+
isPrimaryKey: false;
|
|
155
|
+
isAutoincrement: false;
|
|
156
|
+
hasRuntimeDefault: false;
|
|
157
|
+
enumValues: undefined;
|
|
158
|
+
baseColumn: never;
|
|
159
|
+
identity: undefined;
|
|
160
|
+
generated: undefined;
|
|
161
|
+
}, {}, {}>;
|
|
128
162
|
createdAt: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
129
163
|
name: "created_at";
|
|
130
164
|
tableName: "notification_channels";
|
|
131
|
-
dataType: "
|
|
132
|
-
columnType: "
|
|
165
|
+
dataType: "custom";
|
|
166
|
+
columnType: "MySqlCustomColumn";
|
|
133
167
|
data: string;
|
|
134
|
-
driverParam: string
|
|
168
|
+
driverParam: string;
|
|
135
169
|
notNull: true;
|
|
136
170
|
hasDefault: false;
|
|
137
171
|
isPrimaryKey: false;
|
|
@@ -145,10 +179,10 @@ declare const notificationChannels: import("drizzle-orm/mysql-core").MySqlTableW
|
|
|
145
179
|
updatedAt: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
146
180
|
name: "updated_at";
|
|
147
181
|
tableName: "notification_channels";
|
|
148
|
-
dataType: "
|
|
149
|
-
columnType: "
|
|
182
|
+
dataType: "custom";
|
|
183
|
+
columnType: "MySqlCustomColumn";
|
|
150
184
|
data: string;
|
|
151
|
-
driverParam: string
|
|
185
|
+
driverParam: string;
|
|
152
186
|
notNull: true;
|
|
153
187
|
hasDefault: false;
|
|
154
188
|
isPrimaryKey: false;
|
|
@@ -272,10 +306,10 @@ declare const notificationSubscriptions: import("drizzle-orm/mysql-core").MySqlT
|
|
|
272
306
|
createdAt: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
273
307
|
name: "created_at";
|
|
274
308
|
tableName: "notification_subscriptions";
|
|
275
|
-
dataType: "
|
|
276
|
-
columnType: "
|
|
309
|
+
dataType: "custom";
|
|
310
|
+
columnType: "MySqlCustomColumn";
|
|
277
311
|
data: string;
|
|
278
|
-
driverParam: string
|
|
312
|
+
driverParam: string;
|
|
279
313
|
notNull: true;
|
|
280
314
|
hasDefault: false;
|
|
281
315
|
isPrimaryKey: false;
|
|
@@ -298,6 +332,8 @@ interface NotificationChannel {
|
|
|
298
332
|
secretEncrypted: string | null;
|
|
299
333
|
events: string | null;
|
|
300
334
|
enabled: boolean;
|
|
335
|
+
lastError: string | null;
|
|
336
|
+
lastErrorAt: string | null;
|
|
301
337
|
createdAt: string;
|
|
302
338
|
updatedAt: string;
|
|
303
339
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { datetime } from "./datetime.mjs";
|
|
4
5
|
import { projects } from "./project.mjs";
|
|
5
6
|
import { users } from "./user.mjs";
|
|
6
|
-
import { boolean,
|
|
7
|
+
import { boolean, mysqlTable, text } from "drizzle-orm/mysql-core";
|
|
7
8
|
//#region src/schema/notification.ts
|
|
8
9
|
/** Narrow `notification_channels` table definition. */
|
|
9
10
|
const notificationChannels = mysqlTable("notification_channels", {
|
|
@@ -14,6 +15,11 @@ const notificationChannels = mysqlTable("notification_channels", {
|
|
|
14
15
|
secretEncrypted: text("secret_encrypted"),
|
|
15
16
|
events: text("events"),
|
|
16
17
|
enabled: boolean("enabled").notNull().default(true),
|
|
18
|
+
lastError: text("last_error"),
|
|
19
|
+
lastErrorAt: datetime("last_error_at", {
|
|
20
|
+
mode: "string",
|
|
21
|
+
fsp: 3
|
|
22
|
+
}),
|
|
17
23
|
createdAt: datetime("created_at", {
|
|
18
24
|
mode: "string",
|
|
19
25
|
fsp: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.mjs","names":[],"sources":["../../src/schema/notification.ts"],"sourcesContent":["import { boolean,
|
|
1
|
+
{"version":3,"file":"notification.mjs","names":[],"sources":["../../src/schema/notification.ts"],"sourcesContent":["import { boolean, mysqlTable, text } from \"drizzle-orm/mysql-core\";\nimport { datetime } from \"./datetime.ts\";\nimport { projects } from \"./project.ts\";\nimport { users } from \"./user.ts\";\n\n/** Narrow `notification_channels` table definition. */\nexport const notificationChannels = mysqlTable(\"notification_channels\", {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\").references(() => projects.id, { onDelete: \"cascade\" }),\n provider: text(\"provider\").notNull(),\n config: text(\"config\").notNull(),\n secretEncrypted: text(\"secret_encrypted\"),\n events: text(\"events\"),\n enabled: boolean(\"enabled\").notNull().default(true),\n lastError: text(\"last_error\"),\n lastErrorAt: datetime(\"last_error_at\", { mode: \"string\", fsp: 3 }),\n createdAt: datetime(\"created_at\", { mode: \"string\", fsp: 3 }).notNull(),\n updatedAt: datetime(\"updated_at\", { mode: \"string\", fsp: 3 }).notNull(),\n});\n\n/** Narrow `notification_subscriptions` table definition. */\nexport const notificationSubscriptions = mysqlTable(\"notification_subscriptions\", {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n userId: text(\"user_id\")\n .notNull()\n .references(() => users.id, { onDelete: \"cascade\" }),\n events: text(\"events\"),\n via: text(\"via\"),\n enabled: boolean(\"enabled\").notNull().default(true),\n createdAt: datetime(\"created_at\", { mode: \"string\", fsp: 3 }).notNull(),\n});\n\n/** A notification channel row. */\nexport interface NotificationChannel {\n id: string;\n projectId: string | null;\n provider: string;\n config: string;\n secretEncrypted: string | null;\n events: string | null;\n enabled: boolean;\n lastError: string | null;\n lastErrorAt: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\n/** A per-user notification subscription row. */\nexport interface NotificationSubscription {\n id: string;\n projectId: string;\n userId: string;\n events: string | null;\n via: string | null;\n enabled: boolean;\n createdAt: string;\n}\n"],"mappings":";;;;;;;;;AAMA,MAAa,uBAAuB,WAAW,yBAAyB;CACtE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAAC,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACnF,UAAU,KAAK,UAAU,CAAC,CAAC,QAAQ;CACnC,QAAQ,KAAK,QAAQ,CAAC,CAAC,QAAQ;CAC/B,iBAAiB,KAAK,kBAAkB;CACxC,QAAQ,KAAK,QAAQ;CACrB,SAAS,QAAQ,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CAClD,WAAW,KAAK,YAAY;CAC5B,aAAa,SAAS,iBAAiB;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC;CACjE,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;CACtE,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;AACxE,CAAC;;AAGD,MAAa,4BAA4B,WAAW,8BAA8B;CAChF,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,QAAQ,KAAK,SAAS,CAAC,CACpB,QAAQ,CAAC,CACT,iBAAiB,MAAM,IAAI,EAAE,UAAU,UAAU,CAAC;CACrD,QAAQ,KAAK,QAAQ;CACrB,KAAK,KAAK,KAAK;CACf,SAAS,QAAQ,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CAClD,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;AACxE,CAAC"}
|
|
@@ -80,10 +80,10 @@ declare const projectGroupMappings: import("drizzle-orm/mysql-core").MySqlTableW
|
|
|
80
80
|
createdAt: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
81
81
|
name: "created_at";
|
|
82
82
|
tableName: "project_group_mappings";
|
|
83
|
-
dataType: "
|
|
84
|
-
columnType: "
|
|
83
|
+
dataType: "custom";
|
|
84
|
+
columnType: "MySqlCustomColumn";
|
|
85
85
|
data: string;
|
|
86
|
-
driverParam: string
|
|
86
|
+
driverParam: string;
|
|
87
87
|
notNull: true;
|
|
88
88
|
hasDefault: false;
|
|
89
89
|
isPrimaryKey: false;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { datetime } from "./datetime.mjs";
|
|
4
5
|
import { projects } from "./project.mjs";
|
|
5
|
-
import {
|
|
6
|
+
import { mysqlTable, text, uniqueIndex } from "drizzle-orm/mysql-core";
|
|
6
7
|
//#region src/schema/project-group-mapping.ts
|
|
7
8
|
/** Narrow `project_group_mappings` table definition. */
|
|
8
9
|
const projectGroupMappings = mysqlTable("project_group_mappings", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-group-mapping.mjs","names":[],"sources":["../../src/schema/project-group-mapping.ts"],"sourcesContent":["import type { ProjectRole } from \"@storyshelf/core/types\";\nimport { mysqlTable, text,
|
|
1
|
+
{"version":3,"file":"project-group-mapping.mjs","names":[],"sources":["../../src/schema/project-group-mapping.ts"],"sourcesContent":["import type { ProjectRole } from \"@storyshelf/core/types\";\nimport { mysqlTable, text, uniqueIndex } from \"drizzle-orm/mysql-core\";\nimport { datetime } from \"./datetime.ts\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `project_group_mappings` table definition. */\nexport const projectGroupMappings = mysqlTable(\n \"project_group_mappings\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n groupName: text(\"group_name\").notNull(),\n role: text(\"role\").$type<ProjectRole>().notNull().default(\"viewer\"),\n createdAt: datetime(\"created_at\", { mode: \"string\", fsp: 3 }).notNull(),\n },\n (t) => [uniqueIndex(\"project_group_mappings_project_group_idx\").on(t.projectId, t.groupName)],\n);\n\n/** An identity-provider group to project-role mapping row. */\nexport interface ProjectGroupMapping {\n id: string;\n projectId: string;\n groupName: string;\n role: ProjectRole;\n createdAt: string;\n}\n"],"mappings":";;;;;;;;AAMA,MAAa,uBAAuB,WAClC,0BACA;CACE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,MAAM,KAAK,MAAM,CAAC,CAAC,MAAmB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,QAAQ;CAClE,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;AACxE,IACC,MAAM,CAAC,YAAY,0CAA0C,CAAC,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,CAAC,CAC9F"}
|
|
@@ -212,6 +212,23 @@ declare const projects: import("drizzle-orm/mysql-core").MySqlTableWithColumns<{
|
|
|
212
212
|
identity: undefined;
|
|
213
213
|
generated: undefined;
|
|
214
214
|
}, {}, {}>;
|
|
215
|
+
runTests: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
216
|
+
name: "run_tests";
|
|
217
|
+
tableName: "projects";
|
|
218
|
+
dataType: "boolean";
|
|
219
|
+
columnType: "MySqlBoolean";
|
|
220
|
+
data: boolean;
|
|
221
|
+
driverParam: number | boolean;
|
|
222
|
+
notNull: true;
|
|
223
|
+
hasDefault: true;
|
|
224
|
+
isPrimaryKey: false;
|
|
225
|
+
isAutoincrement: false;
|
|
226
|
+
hasRuntimeDefault: false;
|
|
227
|
+
enumValues: undefined;
|
|
228
|
+
baseColumn: never;
|
|
229
|
+
identity: undefined;
|
|
230
|
+
generated: undefined;
|
|
231
|
+
}, {}, {}>;
|
|
215
232
|
browser: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
216
233
|
name: "browser";
|
|
217
234
|
tableName: "projects";
|
|
@@ -246,6 +263,40 @@ declare const projects: import("drizzle-orm/mysql-core").MySqlTableWithColumns<{
|
|
|
246
263
|
identity: undefined;
|
|
247
264
|
generated: undefined;
|
|
248
265
|
}, {}, {}>;
|
|
266
|
+
browsers: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
267
|
+
name: "browsers";
|
|
268
|
+
tableName: "projects";
|
|
269
|
+
dataType: "string";
|
|
270
|
+
columnType: "MySqlText";
|
|
271
|
+
data: string;
|
|
272
|
+
driverParam: string;
|
|
273
|
+
notNull: false;
|
|
274
|
+
hasDefault: false;
|
|
275
|
+
isPrimaryKey: false;
|
|
276
|
+
isAutoincrement: false;
|
|
277
|
+
hasRuntimeDefault: false;
|
|
278
|
+
enumValues: [string, ...string[]];
|
|
279
|
+
baseColumn: never;
|
|
280
|
+
identity: undefined;
|
|
281
|
+
generated: undefined;
|
|
282
|
+
}, {}, {}>;
|
|
283
|
+
modesAllowlist: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
284
|
+
name: "modes_allowlist";
|
|
285
|
+
tableName: "projects";
|
|
286
|
+
dataType: "string";
|
|
287
|
+
columnType: "MySqlText";
|
|
288
|
+
data: string;
|
|
289
|
+
driverParam: string;
|
|
290
|
+
notNull: false;
|
|
291
|
+
hasDefault: false;
|
|
292
|
+
isPrimaryKey: false;
|
|
293
|
+
isAutoincrement: false;
|
|
294
|
+
hasRuntimeDefault: false;
|
|
295
|
+
enumValues: [string, ...string[]];
|
|
296
|
+
baseColumn: never;
|
|
297
|
+
identity: undefined;
|
|
298
|
+
generated: undefined;
|
|
299
|
+
}, {}, {}>;
|
|
249
300
|
automigrate: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
250
301
|
name: "automigrate";
|
|
251
302
|
tableName: "projects";
|
|
@@ -263,14 +314,82 @@ declare const projects: import("drizzle-orm/mysql-core").MySqlTableWithColumns<{
|
|
|
263
314
|
identity: undefined;
|
|
264
315
|
generated: undefined;
|
|
265
316
|
}, {}, {}>;
|
|
266
|
-
|
|
267
|
-
name: "
|
|
317
|
+
aiProfile: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
318
|
+
name: "ai_profile";
|
|
268
319
|
tableName: "projects";
|
|
269
320
|
dataType: "string";
|
|
270
|
-
columnType: "
|
|
321
|
+
columnType: "MySqlText";
|
|
271
322
|
data: string;
|
|
323
|
+
driverParam: string;
|
|
324
|
+
notNull: false;
|
|
325
|
+
hasDefault: false;
|
|
326
|
+
isPrimaryKey: false;
|
|
327
|
+
isAutoincrement: false;
|
|
328
|
+
hasRuntimeDefault: false;
|
|
329
|
+
enumValues: [string, ...string[]];
|
|
330
|
+
baseColumn: never;
|
|
331
|
+
identity: undefined;
|
|
332
|
+
generated: undefined;
|
|
333
|
+
}, {}, {}>;
|
|
334
|
+
reviewEnabled: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
335
|
+
name: "review_enabled";
|
|
336
|
+
tableName: "projects";
|
|
337
|
+
dataType: "boolean";
|
|
338
|
+
columnType: "MySqlBoolean";
|
|
339
|
+
data: boolean;
|
|
340
|
+
driverParam: number | boolean;
|
|
341
|
+
notNull: true;
|
|
342
|
+
hasDefault: true;
|
|
343
|
+
isPrimaryKey: false;
|
|
344
|
+
isAutoincrement: false;
|
|
345
|
+
hasRuntimeDefault: false;
|
|
346
|
+
enumValues: undefined;
|
|
347
|
+
baseColumn: never;
|
|
348
|
+
identity: undefined;
|
|
349
|
+
generated: undefined;
|
|
350
|
+
}, {}, {}>;
|
|
351
|
+
reviewApprovals: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
352
|
+
name: "review_approvals";
|
|
353
|
+
tableName: "projects";
|
|
354
|
+
dataType: "number";
|
|
355
|
+
columnType: "MySqlInt";
|
|
356
|
+
data: number;
|
|
272
357
|
driverParam: string | number;
|
|
273
358
|
notNull: true;
|
|
359
|
+
hasDefault: true;
|
|
360
|
+
isPrimaryKey: false;
|
|
361
|
+
isAutoincrement: false;
|
|
362
|
+
hasRuntimeDefault: false;
|
|
363
|
+
enumValues: undefined;
|
|
364
|
+
baseColumn: never;
|
|
365
|
+
identity: undefined;
|
|
366
|
+
generated: undefined;
|
|
367
|
+
}, {}, {}>;
|
|
368
|
+
storybookUrlTtlSeconds: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
369
|
+
name: "storybook_url_ttl_seconds";
|
|
370
|
+
tableName: "projects";
|
|
371
|
+
dataType: "number";
|
|
372
|
+
columnType: "MySqlInt";
|
|
373
|
+
data: number;
|
|
374
|
+
driverParam: string | number;
|
|
375
|
+
notNull: false;
|
|
376
|
+
hasDefault: false;
|
|
377
|
+
isPrimaryKey: false;
|
|
378
|
+
isAutoincrement: false;
|
|
379
|
+
hasRuntimeDefault: false;
|
|
380
|
+
enumValues: undefined;
|
|
381
|
+
baseColumn: never;
|
|
382
|
+
identity: undefined;
|
|
383
|
+
generated: undefined;
|
|
384
|
+
}, {}, {}>;
|
|
385
|
+
createdAt: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
386
|
+
name: "created_at";
|
|
387
|
+
tableName: "projects";
|
|
388
|
+
dataType: "custom";
|
|
389
|
+
columnType: "MySqlCustomColumn";
|
|
390
|
+
data: string;
|
|
391
|
+
driverParam: string;
|
|
392
|
+
notNull: true;
|
|
274
393
|
hasDefault: false;
|
|
275
394
|
isPrimaryKey: false;
|
|
276
395
|
isAutoincrement: false;
|
|
@@ -283,10 +402,10 @@ declare const projects: import("drizzle-orm/mysql-core").MySqlTableWithColumns<{
|
|
|
283
402
|
updatedAt: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
284
403
|
name: "updated_at";
|
|
285
404
|
tableName: "projects";
|
|
286
|
-
dataType: "
|
|
287
|
-
columnType: "
|
|
405
|
+
dataType: "custom";
|
|
406
|
+
columnType: "MySqlCustomColumn";
|
|
288
407
|
data: string;
|
|
289
|
-
driverParam: string
|
|
408
|
+
driverParam: string;
|
|
290
409
|
notNull: true;
|
|
291
410
|
hasDefault: false;
|
|
292
411
|
isPrimaryKey: false;
|
|
@@ -314,9 +433,16 @@ interface Project {
|
|
|
314
433
|
executePlay: boolean;
|
|
315
434
|
playTimeoutMs: number;
|
|
316
435
|
runA11y?: boolean;
|
|
436
|
+
runTests?: boolean;
|
|
317
437
|
browser?: string;
|
|
318
438
|
viewports?: string | null;
|
|
439
|
+
browsers?: string | null;
|
|
440
|
+
modesAllowlist?: string | null;
|
|
319
441
|
automigrate: boolean;
|
|
442
|
+
aiProfile: string | null;
|
|
443
|
+
reviewEnabled: boolean;
|
|
444
|
+
reviewApprovals: number;
|
|
445
|
+
storybookUrlTtlSeconds: number | null;
|
|
320
446
|
createdAt: string;
|
|
321
447
|
updatedAt: string;
|
|
322
448
|
}
|
package/dist/schema/project.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import {
|
|
4
|
+
import { datetime } from "./datetime.mjs";
|
|
5
|
+
import { boolean, double, int, mysqlTable, text } from "drizzle-orm/mysql-core";
|
|
5
6
|
//#region src/schema/project.ts
|
|
6
7
|
/** Narrow `projects` table definition. */
|
|
7
8
|
const projects = mysqlTable("projects", {
|
|
@@ -16,10 +17,17 @@ const projects = mysqlTable("projects", {
|
|
|
16
17
|
storybookMeta: text("storybook_meta").$type().default(null),
|
|
17
18
|
executePlay: boolean("execute_play").notNull().default(false),
|
|
18
19
|
playTimeoutMs: int("play_timeout_ms").notNull().default(1e4),
|
|
19
|
-
runA11y: boolean("run_a11y").notNull().default(
|
|
20
|
+
runA11y: boolean("run_a11y").notNull().default(true),
|
|
21
|
+
runTests: boolean("run_tests").notNull().default(false),
|
|
20
22
|
browser: text("browser").notNull().default("chromium"),
|
|
21
23
|
viewports: text("viewports"),
|
|
24
|
+
browsers: text("browsers"),
|
|
25
|
+
modesAllowlist: text("modes_allowlist"),
|
|
22
26
|
automigrate: boolean("automigrate").notNull().default(false),
|
|
27
|
+
aiProfile: text("ai_profile"),
|
|
28
|
+
reviewEnabled: boolean("review_enabled").notNull().default(true),
|
|
29
|
+
reviewApprovals: int("review_approvals").notNull().default(1),
|
|
30
|
+
storybookUrlTtlSeconds: int("storybook_url_ttl_seconds"),
|
|
23
31
|
createdAt: datetime("created_at", {
|
|
24
32
|
mode: "string",
|
|
25
33
|
fsp: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.mjs","names":[],"sources":["../../src/schema/project.ts"],"sourcesContent":["import { boolean, double, int, mysqlTable, text
|
|
1
|
+
{"version":3,"file":"project.mjs","names":[],"sources":["../../src/schema/project.ts"],"sourcesContent":["import { boolean, double, int, mysqlTable, text } from \"drizzle-orm/mysql-core\";\nimport { datetime } from \"./datetime.ts\";\n\n/** Narrow `projects` table definition. */\nexport const projects = mysqlTable(\"projects\", {\n id: text(\"id\").primaryKey(),\n name: text(\"name\").notNull(),\n slug: text(\"slug\").notNull(),\n gitRepository: text(\"git_repository\"),\n gitDefaultBranch: text(\"git_default_branch\").notNull().default(\"main\"),\n pixelThreshold: double(\"pixel_threshold\").notNull().default(0.1),\n maxDiffRatio: double(\"max_diff_ratio\").notNull().default(0.01),\n publicBranchRegex: text(\"public_branch_regex\"),\n storybookMeta: text(\"storybook_meta\").$type<string | null | undefined>().default(null),\n executePlay: boolean(\"execute_play\").notNull().default(false),\n playTimeoutMs: int(\"play_timeout_ms\").notNull().default(10_000),\n runA11y: boolean(\"run_a11y\").notNull().default(true),\n runTests: boolean(\"run_tests\").notNull().default(false),\n browser: text(\"browser\").notNull().default(\"chromium\"),\n viewports: text(\"viewports\"),\n browsers: text(\"browsers\"),\n modesAllowlist: text(\"modes_allowlist\"),\n automigrate: boolean(\"automigrate\").notNull().default(false),\n aiProfile: text(\"ai_profile\"),\n reviewEnabled: boolean(\"review_enabled\").notNull().default(true),\n reviewApprovals: int(\"review_approvals\").notNull().default(1),\n storybookUrlTtlSeconds: int(\"storybook_url_ttl_seconds\"),\n createdAt: datetime(\"created_at\", { mode: \"string\", fsp: 3 }).notNull(),\n updatedAt: datetime(\"updated_at\", { mode: \"string\", fsp: 3 }).notNull(),\n});\n\n/** A project row. */\nexport interface Project {\n id: string;\n name: string;\n slug: string;\n gitRepository: string | null;\n gitDefaultBranch: string;\n pixelThreshold: number;\n maxDiffRatio: number;\n publicBranchRegex: string | null;\n storybookMeta: string | null | undefined;\n executePlay: boolean;\n playTimeoutMs: number;\n runA11y?: boolean;\n runTests?: boolean;\n browser?: string;\n viewports?: string | null;\n browsers?: string | null;\n modesAllowlist?: string | null;\n automigrate: boolean;\n aiProfile: string | null;\n reviewEnabled: boolean;\n reviewApprovals: number;\n storybookUrlTtlSeconds: number | null;\n createdAt: string;\n updatedAt: string;\n}\n\n/** Storybook metadata synced from a project's published Storybook. */\nexport interface StorybookMeta {\n framework?: { name?: string; options?: unknown };\n addons?: string[];\n storiesGlobs?: string[];\n staticDirs?: string[];\n packagePath?: string;\n previewParameters?: Record<string, unknown>;\n}\n"],"mappings":";;;;;;;AAIA,MAAa,WAAW,WAAW,YAAY;CAC7C,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,MAAM,KAAK,MAAM,CAAC,CAAC,QAAQ;CAC3B,MAAM,KAAK,MAAM,CAAC,CAAC,QAAQ;CAC3B,eAAe,KAAK,gBAAgB;CACpC,kBAAkB,KAAK,oBAAoB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,MAAM;CACrE,gBAAgB,OAAO,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAG;CAC/D,cAAc,OAAO,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAI;CAC7D,mBAAmB,KAAK,qBAAqB;CAC7C,eAAe,KAAK,gBAAgB,CAAC,CAAC,MAAiC,CAAC,CAAC,QAAQ,IAAI;CACrF,aAAa,QAAQ,cAAc,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC5D,eAAe,IAAI,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAM;CAC9D,SAAS,QAAQ,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACnD,UAAU,QAAQ,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CACtD,SAAS,KAAK,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,UAAU;CACrD,WAAW,KAAK,WAAW;CAC3B,UAAU,KAAK,UAAU;CACzB,gBAAgB,KAAK,iBAAiB;CACtC,aAAa,QAAQ,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC3D,WAAW,KAAK,YAAY;CAC5B,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CAC/D,iBAAiB,IAAI,kBAAkB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC5D,wBAAwB,IAAI,2BAA2B;CACvD,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;CACtE,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;AACxE,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
//#region src/schema/site-setting.d.ts
|
|
4
|
+
/** Narrow `site_settings` table definition: key-value facts the app learns at runtime. */
|
|
5
|
+
declare const siteSettings: import("drizzle-orm/mysql-core").MySqlTableWithColumns<{
|
|
6
|
+
name: "site_settings";
|
|
7
|
+
schema: undefined;
|
|
8
|
+
columns: {
|
|
9
|
+
id: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
10
|
+
name: "id";
|
|
11
|
+
tableName: "site_settings";
|
|
12
|
+
dataType: "string";
|
|
13
|
+
columnType: "MySqlText";
|
|
14
|
+
data: string;
|
|
15
|
+
driverParam: string;
|
|
16
|
+
notNull: true;
|
|
17
|
+
hasDefault: false;
|
|
18
|
+
isPrimaryKey: true;
|
|
19
|
+
isAutoincrement: false;
|
|
20
|
+
hasRuntimeDefault: false;
|
|
21
|
+
enumValues: [string, ...string[]];
|
|
22
|
+
baseColumn: never;
|
|
23
|
+
identity: undefined;
|
|
24
|
+
generated: undefined;
|
|
25
|
+
}, {}, {}>;
|
|
26
|
+
value: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
27
|
+
name: "value";
|
|
28
|
+
tableName: "site_settings";
|
|
29
|
+
dataType: "string";
|
|
30
|
+
columnType: "MySqlText";
|
|
31
|
+
data: string;
|
|
32
|
+
driverParam: string;
|
|
33
|
+
notNull: true;
|
|
34
|
+
hasDefault: false;
|
|
35
|
+
isPrimaryKey: false;
|
|
36
|
+
isAutoincrement: false;
|
|
37
|
+
hasRuntimeDefault: false;
|
|
38
|
+
enumValues: [string, ...string[]];
|
|
39
|
+
baseColumn: never;
|
|
40
|
+
identity: undefined;
|
|
41
|
+
generated: undefined;
|
|
42
|
+
}, {}, {}>;
|
|
43
|
+
updatedBy: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
44
|
+
name: "updated_by";
|
|
45
|
+
tableName: "site_settings";
|
|
46
|
+
dataType: "string";
|
|
47
|
+
columnType: "MySqlText";
|
|
48
|
+
data: string;
|
|
49
|
+
driverParam: string;
|
|
50
|
+
notNull: false;
|
|
51
|
+
hasDefault: false;
|
|
52
|
+
isPrimaryKey: false;
|
|
53
|
+
isAutoincrement: false;
|
|
54
|
+
hasRuntimeDefault: false;
|
|
55
|
+
enumValues: [string, ...string[]];
|
|
56
|
+
baseColumn: never;
|
|
57
|
+
identity: undefined;
|
|
58
|
+
generated: undefined;
|
|
59
|
+
}, {}, {}>;
|
|
60
|
+
createdAt: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
61
|
+
name: "created_at";
|
|
62
|
+
tableName: "site_settings";
|
|
63
|
+
dataType: "custom";
|
|
64
|
+
columnType: "MySqlCustomColumn";
|
|
65
|
+
data: string;
|
|
66
|
+
driverParam: string;
|
|
67
|
+
notNull: true;
|
|
68
|
+
hasDefault: false;
|
|
69
|
+
isPrimaryKey: false;
|
|
70
|
+
isAutoincrement: false;
|
|
71
|
+
hasRuntimeDefault: false;
|
|
72
|
+
enumValues: undefined;
|
|
73
|
+
baseColumn: never;
|
|
74
|
+
identity: undefined;
|
|
75
|
+
generated: undefined;
|
|
76
|
+
}, {}, {}>;
|
|
77
|
+
updatedAt: import("drizzle-orm/mysql-core").MySqlColumn<{
|
|
78
|
+
name: "updated_at";
|
|
79
|
+
tableName: "site_settings";
|
|
80
|
+
dataType: "custom";
|
|
81
|
+
columnType: "MySqlCustomColumn";
|
|
82
|
+
data: string;
|
|
83
|
+
driverParam: string;
|
|
84
|
+
notNull: true;
|
|
85
|
+
hasDefault: false;
|
|
86
|
+
isPrimaryKey: false;
|
|
87
|
+
isAutoincrement: false;
|
|
88
|
+
hasRuntimeDefault: false;
|
|
89
|
+
enumValues: undefined;
|
|
90
|
+
baseColumn: never;
|
|
91
|
+
identity: undefined;
|
|
92
|
+
generated: undefined;
|
|
93
|
+
}, {}, {}>;
|
|
94
|
+
};
|
|
95
|
+
dialect: 'mysql';
|
|
96
|
+
}>;
|
|
97
|
+
//#endregion
|
|
98
|
+
export { siteSettings };
|
|
99
|
+
//# sourceMappingURL=site-setting.d.mts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { datetime } from "./datetime.mjs";
|
|
5
|
+
import { mysqlTable, text } from "drizzle-orm/mysql-core";
|
|
6
|
+
//#region src/schema/site-setting.ts
|
|
7
|
+
/** Narrow `site_settings` table definition: key-value facts the app learns at runtime. */
|
|
8
|
+
const siteSettings = mysqlTable("site_settings", {
|
|
9
|
+
id: text("id").primaryKey(),
|
|
10
|
+
value: text("value").notNull(),
|
|
11
|
+
updatedBy: text("updated_by"),
|
|
12
|
+
createdAt: datetime("created_at", {
|
|
13
|
+
mode: "string",
|
|
14
|
+
fsp: 3
|
|
15
|
+
}).notNull(),
|
|
16
|
+
updatedAt: datetime("updated_at", {
|
|
17
|
+
mode: "string",
|
|
18
|
+
fsp: 3
|
|
19
|
+
}).notNull()
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
export { siteSettings };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=site-setting.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-setting.mjs","names":[],"sources":["../../src/schema/site-setting.ts"],"sourcesContent":["import { mysqlTable, text } from \"drizzle-orm/mysql-core\";\nimport { datetime } from \"./datetime.ts\";\n\n/** Narrow `site_settings` table definition: key-value facts the app learns at runtime. */\nexport const siteSettings = mysqlTable(\"site_settings\", {\n id: text(\"id\").primaryKey(),\n value: text(\"value\").notNull(),\n updatedBy: text(\"updated_by\"),\n createdAt: datetime(\"created_at\", { mode: \"string\", fsp: 3 }).notNull(),\n updatedAt: datetime(\"updated_at\", { mode: \"string\", fsp: 3 }).notNull(),\n});\n"],"mappings":";;;;;;;AAIA,MAAa,eAAe,WAAW,iBAAiB;CACtD,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,OAAO,KAAK,OAAO,CAAC,CAAC,QAAQ;CAC7B,WAAW,KAAK,YAAY;CAC5B,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;CACtE,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;AACxE,CAAC"}
|