@crombolo/data 0.9.1 → 0.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.
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Migration 030 — a transfer run records the package it applied.
3
+ *
4
+ * A bundle's content arrives inside an npm package, so the run names the
5
+ * package and the version that brought it. That is what tells the Installed
6
+ * view whether a dependency's content has been applied here, and which release
7
+ * of it. Nullable, because a run before this one has no package to name.
8
+ */
9
+ import type { Db } from '../database.ts'
10
+ import type { Migration } from '../migrations.ts'
11
+ import { schemaOps } from '../schema-ops.ts'
12
+ import { STATE_BUNDLE_PACKAGE } from './bundle-package.ts'
13
+
14
+ export const STATE_TRANSFER_RUN_PACKAGE = '{6f1d4a8e-0030-4d2b-8e5c-7a1f9b3d6e30}'
15
+
16
+ export const transferRunPackageMigration: Migration = {
17
+ from: STATE_BUNDLE_PACKAGE,
18
+ to: STATE_TRANSFER_RUN_PACKAGE,
19
+ name: 'AddTransferRunPackage',
20
+ kind: 'expand',
21
+ release: '0.10.0',
22
+ async up(db: Db) {
23
+ const ops = schemaOps(db)
24
+ await ops.addColumn('content_transfer_run', 'package_name', db.dialect.types.varchar(214))
25
+ await ops.addColumn('content_transfer_run', 'package_version', db.dialect.types.varchar(64))
26
+ },
27
+ }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Migration 005 — `upgrade_report`: the pre-upgrade check's findings, in a
3
3
  * stable shape the backoffice dashboard reads whatever version is live.
4
- * docs/10-packaging-and-upgrades.md, "The upgrade dashboard ships in the first release".
4
+ * docs/packaging-and-upgrades.md, "The upgrade dashboard ships in the first release".
5
5
  */
6
6
  import type { Db } from '../database.ts'
7
7
  import type { Migration } from '../migrations.ts'
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * `(version, revision)` is a deployment's identity: `version` is the human
6
6
  * value in `schema/schema.toml`, `revision` a monotonic number supplied at
7
- * deploy time. See docs/10-packaging-and-upgrades.md.
7
+ * deploy time. See docs/packaging-and-upgrades.md.
8
8
  */
9
9
  import type { Db } from './database.ts'
10
10
  import { DbDate } from './dialect.ts'