@byline/db-mysql 4.9.0 → 4.10.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 +32 -34
- package/dist/lib/boot-check.js +3 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
# @byline/db-mysql
|
|
2
2
|
|
|
3
|
-
> **Status:
|
|
4
|
-
>
|
|
5
|
-
>
|
|
6
|
-
> `@byline/
|
|
7
|
-
> passes, with identical results. Search is also implemented; the remaining
|
|
8
|
-
> limitations are in tooling and breadth of environment coverage:
|
|
3
|
+
> **Status: generally available.** The storage adapter passes the same
|
|
4
|
+
> `@byline/db-conformance` suite as `@byline/db-postgres`,
|
|
5
|
+
> `@byline/search-mysql` supplies the matching search provider, and
|
|
6
|
+
> `@byline/cli` can provision and scaffold a MySQL installation.
|
|
9
7
|
>
|
|
10
|
-
>
|
|
11
|
-
>
|
|
12
|
-
>
|
|
13
|
-
>
|
|
14
|
-
>
|
|
15
|
-
> - **Narrower CI coverage than Postgres.** Continuous integration pins MySQL 8.0
|
|
16
|
-
> — the engine floor — so nothing yet exercises 9.x automatically, and no leg
|
|
17
|
-
> runs under a non-UTC timezone. Tracked in
|
|
18
|
-
> [#55](https://github.com/Byline-CMS/bylinecms.dev/issues/55).
|
|
19
|
-
>
|
|
20
|
-
> Treat it as suitable for evaluation, prototypes, and controlled installations.
|
|
21
|
-
> The criteria for general availability are tracked in
|
|
22
|
-
> [#58](https://github.com/Byline-CMS/bylinecms.dev/issues/58).
|
|
8
|
+
> Continuous integration pins MySQL 8.0 to exercise the supported engine floor.
|
|
9
|
+
> Both adapter conformance suites also run under a non-UTC timezone
|
|
10
|
+
> (`Asia/Kathmandu`) so calendar-date handling cannot silently depend on the
|
|
11
|
+
> host timezone. MySQL 9.x remains covered by local development with
|
|
12
|
+
> `mysql/docker-compose.yml`, which runs `mysql:latest`.
|
|
23
13
|
|
|
24
14
|
MySQL adapter for Byline CMS — Drizzle schema, migrations, and the storage /
|
|
25
15
|
queries / commands implementation behind `IDbAdapter`. It is Byline's second
|
|
@@ -40,6 +30,20 @@ workflow, and content translation as first-class concerns.
|
|
|
40
30
|
|
|
41
31
|
## Install
|
|
42
32
|
|
|
33
|
+
For a new Byline installation, let the CLI select the package, environment
|
|
34
|
+
variable, baseline, and server configuration together:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
npx @byline/cli@latest init --database mysql
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The generated application uses `@byline/db-mysql`,
|
|
41
|
+
`@byline/db-mysql/admin`, and
|
|
42
|
+
`BYLINE_DB_MYSQL_CONNECTION_STRING`. If you include the example collections,
|
|
43
|
+
it also installs and registers `@byline/search-mysql`.
|
|
44
|
+
|
|
45
|
+
For a hand-wired application:
|
|
46
|
+
|
|
43
47
|
```sh
|
|
44
48
|
pnpm add @byline/db-mysql
|
|
45
49
|
```
|
|
@@ -80,10 +84,9 @@ const core = await initBylineCore({
|
|
|
80
84
|
})
|
|
81
85
|
```
|
|
82
86
|
|
|
83
|
-
This
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
because both adapters implement the same `IDbAdapter` and `AdminStore` contracts.
|
|
87
|
+
This is the wiring generated by `byline init --database mysql`. Both database
|
|
88
|
+
adapters implement the same `IDbAdapter` and `AdminStore` contracts, so the
|
|
89
|
+
rest of the server configuration is adapter-independent.
|
|
87
90
|
|
|
88
91
|
`connectionString` is the **only** connection input `mysqlAdapter` takes, and
|
|
89
92
|
it must be a `mysql://` URL — mysql2 parses connection URLs natively (`uri`
|
|
@@ -234,17 +237,12 @@ uses parser-safe portable terms, weighted MySQL `FULLTEXT` indexes, and analyzer
|
|
|
234
237
|
fingerprints. Its package README documents migrations, capabilities, and the
|
|
235
238
|
clear-and-rebuild procedure.
|
|
236
239
|
|
|
237
|
-
##
|
|
238
|
-
|
|
239
|
-
- **
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
search packages expose the same `migrate(pool)` shape.
|
|
244
|
-
- **A MySQL storage-benchmark target.** The design spec flags view
|
|
245
|
-
materialisation (the `ROW_NUMBER()` window inside a derived table, used
|
|
246
|
-
by both current-version views) as a question to answer before this
|
|
247
|
-
adapter's GA — Postgres's own benchmark sweep
|
|
240
|
+
## Current boundaries
|
|
241
|
+
|
|
242
|
+
- **A MySQL storage-benchmark target (non-blocking).** The design spec flags
|
|
243
|
+
view materialisation (the `ROW_NUMBER()` window inside a derived table,
|
|
244
|
+
used by both current-version views) as useful performance-characterisation
|
|
245
|
+
work. It is not a release gate. PostgreSQL's own benchmark sweep
|
|
248
246
|
([`docs/03-architecture/01-document-storage.md`](https://github.com/Byline-CMS/bylinecms.dev/blob/develop/docs/03-architecture/01-document-storage.md#indicative-benchmarks))
|
|
249
247
|
has no MySQL counterpart yet. Tracked in
|
|
250
248
|
[issue #53](https://github.com/Byline-CMS/bylinecms.dev/issues/53).
|
package/dist/lib/boot-check.js
CHANGED
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
* `initBylineCore()` boot rather than surfacing as an obscure SQL error the
|
|
12
12
|
* first time the storage layer emits a LATERAL join (Task 10+).
|
|
13
13
|
*/
|
|
14
|
+
// Keep this adapter floor synchronized with the pre-install check in
|
|
15
|
+
// `packages/cli/src/lib/database/mysql.ts`; the CLI contract test compares
|
|
16
|
+
// the two constants without adding a runtime dependency on this package.
|
|
14
17
|
const MIN = { major: 8, minor: 0, patch: 14 };
|
|
15
18
|
const unsupportedEngineError = (reported) => new Error(`@byline/db-mysql requires MySQL ${MIN.major}.${MIN.minor}.${MIN.patch}+ (LATERAL joins); server reports ${reported}. MariaDB is not supported.`);
|
|
16
19
|
/**
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@byline/db-mysql",
|
|
3
3
|
"private": false,
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.10.0",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20.9.0"
|
|
8
8
|
},
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"drizzle-orm": "^0.45.2",
|
|
51
51
|
"mysql2": "^3.23.1",
|
|
52
52
|
"uuid": "^14.0.1",
|
|
53
|
-
"@byline/admin": "4.
|
|
54
|
-
"@byline/core": "4.
|
|
53
|
+
"@byline/admin": "4.10.0",
|
|
54
|
+
"@byline/core": "4.10.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@biomejs/biome": "2.5.4",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"tsx": "^4.23.1",
|
|
66
66
|
"typescript": "^7.0.2",
|
|
67
67
|
"vitest": "^4.1.10",
|
|
68
|
-
"@byline/
|
|
69
|
-
"@byline/
|
|
70
|
-
"@byline/
|
|
68
|
+
"@byline/auth": "4.10.0",
|
|
69
|
+
"@byline/db-conformance": "0.0.4",
|
|
70
|
+
"@byline/client": "4.10.0"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public",
|