Skip to content

Commit f0cda41

Browse files
Jurij Skornikclaude
andcommitted
Unify publisher plugin database setup and migration paths
- Make Drizzle migrations the single source of truth, replacing dual raw DDL + Drizzle paths in setup.js - Auto-run migrations on plugin startup (zero manual steps for updates) - Add bootstrap guard for databases created by old setup.js (seeds __drizzle_migrations journal so Drizzle can take over) - Fix migration 0001 FK incompatibility: change PKs from serial (BIGINT UNSIGNED) to int AUTO_INCREMENT to match int FK columns - Add 0002 migration for error_details column and private_key rename - Fix migration folder path resolution for tsup flat bundle output - Improve setup.js: hide password input, fix Mode 1 config overwrite, replace raw DDL with migrate(), update wording - Add structured error details to publishing attempts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 480d08f commit f0cda41

18 files changed

Lines changed: 4064 additions & 1611 deletions

package-lock.json

Lines changed: 2828 additions & 1399 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@
5353
"apps/agent/tests/integration"
5454
],
5555
"dependencies": {
56+
"dkg.js": "^8.2.4",
5657
"mysql2": "^3.15.3"
5758
},
5859
"overrides": {
5960
"@types/express": "^5.0.3"
6061
},
6162
"optionalDependencies": {
62-
"@rollup/rollup-linux-x64-gnu": "^4.52.5",
63-
"@node-rs/argon2-linux-x64-gnu": "^1.7.0"
63+
"@node-rs/argon2-linux-x64-gnu": "^1.7.0",
64+
"@rollup/rollup-linux-x64-gnu": "^4.52.5"
6465
}
6566
}

packages/plugin-dkg-publisher/migrate.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
/**
44
* Database migration script for DKG Publisher Plugin
5-
* This script runs Drizzle migrations to create/update database tables
5+
*
6+
* NOTE: Migrations now run automatically on plugin startup (see services/index.ts).
7+
* This script is provided for manual/debug use only.
68
*/
79

810
const { drizzle } = require("drizzle-orm/mysql2");

0 commit comments

Comments
 (0)