@madewithremy/admin 0.1.60 → 0.1.62

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
@@ -4,6 +4,25 @@ What changed in `@madewithremy/admin`, newest first, each version under its own
4
4
 
5
5
  Versions before 0.1.44 aren't recorded here.
6
6
 
7
+ ## 0.1.62
8
+
9
+ ### Changed behavior
10
+
11
+ - `db history attach` (`admin.db.historyAttach()`) is refused for a past database larger than 1 GB, as a `sql_error` that says so, since the attach copies it for every call. Read what you need with `db history query` and write it to live with `db query` instead. Check for: a repair script that attaches a large past database.
12
+ - `db history query` and `db history attach` can answer a `sql_error` saying the server has no room to copy the past database right now. Nothing was applied; try again shortly.
13
+
14
+ ## 0.1.61
15
+
16
+ ### New
17
+
18
+ - `db history purge` (`admin.db.historyPurge()`) deletes every copy of the database the app's replaced releases keep, now, for a deletion request that can't wait. Live is untouched.
19
+ - Each entry `db history` lists carries `keptUntil`, when its copy is deleted.
20
+
21
+ ### Changed behavior
22
+
23
+ - `data lift-from-live` (`admin.data.liftFromLive()`) is refused with `live_too_large_to_copy` (422) once live's databases are past 1 GB. Check for: a workflow that pulls a large live into dev, which should seed dev with scenarios instead. `--truncate` is unaffected.
24
+ - A replaced release's copy of the database is kept 28 days after the release is replaced, then deleted. Before, every copy was kept for the life of the app. `db history` lists only the copies still kept, and reading or attaching one that's gone answers `copy_expired` (404) instead of `no_database`. Check for: a script or a recovery that reaches for a copy older than 28 days.
25
+
7
26
  ## 0.1.60
8
27
 
9
28
  ### New
package/dist/index.js CHANGED
@@ -1707,6 +1707,7 @@ var db_exports = {};
1707
1707
  __export(db_exports, {
1708
1708
  history: () => history,
1709
1709
  historyAttach: () => historyAttach,
1710
+ historyPurge: () => historyPurge,
1710
1711
  historyQuery: () => historyQuery,
1711
1712
  query: () => query2
1712
1713
  });
@@ -1741,6 +1742,14 @@ function historyAttach(ctx, releaseId, sql) {
1741
1742
  { releaseId, queries: [{ sql }] }
1742
1743
  );
1743
1744
  }
1745
+ function historyPurge(ctx) {
1746
+ return call(
1747
+ ctx,
1748
+ "POST",
1749
+ `/_internal/v2/apps/${ctx.appId}/db/history/purge`,
1750
+ {}
1751
+ );
1752
+ }
1744
1753
 
1745
1754
  // src/ops/diagnostics.ts
1746
1755
  var diagnostics_exports = {};