@jskit-ai/database-runtime-mysql 0.1.274 → 0.1.276
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/CHANGELOG.md
CHANGED
|
@@ -2,4 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- The MySQL application pattern names `STAGING_DB_NAME` and `PRODUCTION_DB_NAME` among the databases the test runs refuse, in place of `PROD_DB_NAME`, and calls its prepare script the entrypoint for managed sessions and for staging and production servers.
|
|
5
6
|
- **Breaking.** `introspectCrudTableSnapshot` is removed from `./shared` and from the MySQL driver capability (`runtime.database.driver`), which now holds only `DIALECT_ID`: nothing used it since CRUD generation was removed. A table's foreign keys come from `listForeignKeys` in `@jskit-ai/database-runtime/server/foreignKeyMigrations`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/database-runtime-mysql",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.276",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jskit test"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
59
|
-
"@jskit-ai/kernel": "0.2.
|
|
58
|
+
"@jskit-ai/database-runtime": "0.1.278",
|
|
59
|
+
"@jskit-ai/kernel": "0.2.28"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -52,7 +52,7 @@ Knex discovers package-owned migrations from the installed dependency graph.
|
|
|
52
52
|
`example/package.json` contains the runtime dependency and database scripts.
|
|
53
53
|
`example/knexfile.js` loads an optional local `.env` and fixes the MySQL dialect.
|
|
54
54
|
`example/scripts/prepare-database.js` is the portable migrate-then-seed
|
|
55
|
-
entrypoint for managed sessions and
|
|
55
|
+
entrypoint for managed sessions and for staging and production servers. It loads the optional `.env`
|
|
56
56
|
as the knexfile does, and migrates the database `DB_NAME` names without
|
|
57
57
|
creating it: the hosting environment or a database administrator creates it
|
|
58
58
|
first. `example/.env.example` names the connection values and separate test
|
|
@@ -83,8 +83,8 @@ server its own copy of `BROWSER_TEST_DB_NAME`, restored from the same kind of
|
|
|
83
83
|
snapshot and seeded in one transaction by the app's fixture `seed`, which
|
|
84
84
|
restores any migration-owned baseline rows the app needs. Every server serves
|
|
85
85
|
the production build. Both refuse the application's database (`DB_NAME`,
|
|
86
|
-
`DATABASE_URL`'s, the Knex connection's), `
|
|
87
|
-
database and its copies. Provision `TEST_DB_NAME`, `BROWSER_TEST_DB_NAME` and
|
|
86
|
+
`DATABASE_URL`'s, the Knex connection's), `STAGING_DB_NAME`,
|
|
87
|
+
`PRODUCTION_DB_NAME` and the other test database and its copies. Provision `TEST_DB_NAME`, `BROWSER_TEST_DB_NAME` and
|
|
88
88
|
their numbered copies with grants for the application account (a `<app>_%`
|
|
89
89
|
grant covers them); a user who may create no copies runs one file or worker at
|
|
90
90
|
a time. Two test runs at once need different database names. Test-only server
|