From f593595a29bf1e02eb74395bf9c7e20b954faa1a Mon Sep 17 00:00:00 2001 From: Tomasz Kopacki Date: Tue, 17 Mar 2026 11:53:56 +0100 Subject: [PATCH 1/8] Setup `drizzle-kit` to enable database migrations for ENSNode Schema --- packages/ensdb-sdk/README.md | 28 +++ packages/ensdb-sdk/drizzle.config.ts | 10 + packages/ensdb-sdk/package.json | 4 +- pnpm-lock.yaml | 286 +++++++++++++++++++-------- 4 files changed, 246 insertions(+), 82 deletions(-) create mode 100644 packages/ensdb-sdk/drizzle.config.ts diff --git a/packages/ensdb-sdk/README.md b/packages/ensdb-sdk/README.md index f2868a92f8..91e8e841f1 100644 --- a/packages/ensdb-sdk/README.md +++ b/packages/ensdb-sdk/README.md @@ -1,3 +1,31 @@ # ENSDb SDK This package is a utility library for interacting with ENSDb. + +## Database schema definitions + +### ENSIndexer Schema + +This schema consist of database object definitions exported from `src/ensindexer` module. +Defining database objects is done by using functionality from `ponder` package. + +#### Applying schema definition updates + +Updating database object definitions in ENSIndexer Schema _does not_ require any extra steps. ENSIndexer app is built on top of Ponder app. The Ponder app runtime takes care of generating migrations and having them executed during application runtime. In other words, ENSIndexer Schema in ENSDb gets auto-updated when ENSIndexer app starts. + +### ENSNode Schema + +This schema consist of database object definitions exported from `src/ensnode` module. +Defining database objects is done by using functionality from `drizzle-orm` package. + +#### Applying schema definition updates + +Updating database object definitions in ENSNode Schema _does_ require an extra step: generating SQL queries to be executed for ENSNode Schema in ENSDb. + +Generating SQL queries can be done with the following CLI command: +``` +pnpm -F @ensnode/ensdb-sdk drizzle-kit:generate +``` + +This command will update files inside the `migrations` directory, including SQL files. +The `migrations` directory can be later reference by application runtime (i.e. ENSIndexer app) in order to execute pending SQL migrations for ENSNode Schema in ENSDb. diff --git a/packages/ensdb-sdk/drizzle.config.ts b/packages/ensdb-sdk/drizzle.config.ts new file mode 100644 index 0000000000..f4f5323af3 --- /dev/null +++ b/packages/ensdb-sdk/drizzle.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from "drizzle-kit"; + +const ensNodeSchemaPath = "./src/ensnode/index.ts"; + +export default defineConfig({ + casing: "snake_case", + dialect: "postgresql", + out: "migrations", + schema: ensNodeSchemaPath, +}); diff --git a/packages/ensdb-sdk/package.json b/packages/ensdb-sdk/package.json index c9d231ff9a..4b7936c03d 100644 --- a/packages/ensdb-sdk/package.json +++ b/packages/ensdb-sdk/package.json @@ -52,7 +52,8 @@ "scripts": { "prepublish": "tsup", "lint": "biome check --write .", - "lint:ci": "biome ci" + "lint:ci": "biome ci", + "drizzle-kit:generate": "drizzle-kit generate" }, "peerDependencies": { "drizzle-orm": "catalog:", @@ -62,6 +63,7 @@ "devDependencies": { "@ensnode/ensnode-sdk": "workspace:", "@ensnode/shared-configs": "workspace:*", + "drizzle-kit": "0.31.10", "drizzle-orm": "catalog:", "ponder": "catalog:", "tsup": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a6383f9ed3..860f4ee66b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -137,13 +137,13 @@ importers: version: 27.0.1(postcss@8.5.6) tsup: specifier: 'catalog:' - version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) typescript: specifier: 'catalog:' version: 5.9.3 vitest: specifier: 'catalog:' - version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) apps/ensadmin: dependencies: @@ -300,7 +300,7 @@ importers: version: 5.9.3 vitest: specifier: 'catalog:' - version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) apps/ensapi: dependencies: @@ -527,7 +527,7 @@ importers: version: 5.9.3 vitest: specifier: 'catalog:' - version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) apps/ensrainbow: dependencies: @@ -636,22 +636,22 @@ importers: dependencies: '@astrojs/mdx': specifier: ^4.3.9 - version: 4.3.9(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)) + version: 4.3.9(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)) '@astrojs/react': specifier: 'catalog:' - version: 4.4.1(@types/node@24.10.9)(@types/react-dom@18.3.7(@types/react@18.3.26))(@types/react@18.3.26)(jiti@2.6.1)(lightningcss@1.30.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(tsx@4.20.6)(yaml@2.8.1) + version: 4.4.1(@types/node@24.10.9)(@types/react-dom@18.3.7(@types/react@18.3.26))(@types/react@18.3.26)(jiti@2.6.1)(lightningcss@1.30.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(tsx@4.21.0)(yaml@2.8.1) '@astrojs/sitemap': specifier: ^3.6.0 version: 3.6.0 '@astrojs/starlight': specifier: ^0.36.1 - version: 0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)) + version: 0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)) '@astrojs/starlight-tailwind': specifier: ^4.0.1 - version: 4.0.1(@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)))(tailwindcss@4.1.5) + version: 4.0.1(@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)))(tailwindcss@4.1.5) '@astrojs/tailwind': specifier: 'catalog:' - version: 6.0.2(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1))(tailwindcss@4.1.5)(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3)) + version: 6.0.2(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1))(tailwindcss@4.1.5)(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3)) '@fontsource/inter': specifier: ^5.2.5 version: 5.2.8 @@ -672,10 +672,10 @@ importers: version: 20.1.2 '@tailwindcss/vite': specifier: ^4.1.15 - version: 4.1.16(vite@7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1)) + version: 4.1.16(vite@7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) astro: specifier: 'catalog:' - version: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + version: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) astro-font: specifier: 'catalog:' version: 1.1.0 @@ -684,7 +684,7 @@ importers: version: 1.1.5 astro-mermaid: specifier: ^1.0.4 - version: 1.1.0(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1))(mermaid@11.12.3) + version: 1.1.0(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1))(mermaid@11.12.3) astro-seo: specifier: 'catalog:' version: 0.8.4(prettier@3.6.2)(typescript@5.9.3) @@ -711,10 +711,10 @@ importers: version: 0.33.5 starlight-llms-txt: specifier: ^0.5.0 - version: 0.5.1(@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)))(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)) + version: 0.5.1(@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)))(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)) starlight-sidebar-topics: specifier: ^0.4.1 - version: 0.4.1(@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1))) + version: 0.4.1(@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1))) tailwindcss: specifier: 4.1.5 version: 4.1.5 @@ -730,10 +730,10 @@ importers: dependencies: '@astrojs/react': specifier: 'catalog:' - version: 4.4.1(@types/node@24.10.9)(@types/react-dom@18.3.7(@types/react@18.3.26))(@types/react@18.3.26)(jiti@2.6.1)(lightningcss@1.30.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(tsx@4.20.6)(yaml@2.8.1) + version: 4.4.1(@types/node@24.10.9)(@types/react-dom@18.3.7(@types/react@18.3.26))(@types/react@18.3.26)(jiti@2.6.1)(lightningcss@1.30.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(tsx@4.21.0)(yaml@2.8.1) '@astrojs/tailwind': specifier: 'catalog:' - version: 6.0.2(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1))(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3)))(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3)) + version: 6.0.2(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1))(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3)))(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3)) '@heroicons/react': specifier: ^2.2.0 version: 2.2.0(react@18.3.1) @@ -745,7 +745,7 @@ importers: version: 0.12.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.9.3)(zod@3.25.76) astro: specifier: 'catalog:' - version: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + version: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) astro-font: specifier: 'catalog:' version: 1.1.0 @@ -789,7 +789,7 @@ importers: version: 24.10.9 tsup: specifier: 'catalog:' - version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) typescript: specifier: 'catalog:' version: 5.9.3 @@ -798,7 +798,7 @@ importers: version: 2.38.5(typescript@5.9.3)(zod@4.3.6) vitest: specifier: 'catalog:' - version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) packages/ens-referrals: dependencies: @@ -817,7 +817,7 @@ importers: version: 24.10.9 tsup: specifier: ^8.3.6 - version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) typescript: specifier: 'catalog:' version: 5.9.3 @@ -826,7 +826,7 @@ importers: version: 2.38.5(typescript@5.9.3)(zod@4.3.6) vitest: specifier: 'catalog:' - version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) packages/ensdb-sdk: devDependencies: @@ -836,6 +836,9 @@ importers: '@ensnode/shared-configs': specifier: workspace:* version: link:../shared-configs + drizzle-kit: + specifier: 0.31.10 + version: 0.31.10 drizzle-orm: specifier: 'catalog:' version: 0.41.0(@electric-sql/pglite@0.2.13)(@opentelemetry/api@1.9.0(patch_hash=4b2adeefaf7c22f9987d0a125d69cab900719bec7ed7636648bea6947107033a))(@types/pg@8.16.0)(kysely@0.26.3)(pg@8.16.3) @@ -844,7 +847,7 @@ importers: version: 0.16.3(@opentelemetry/api@1.9.0(patch_hash=4b2adeefaf7c22f9987d0a125d69cab900719bec7ed7636648bea6947107033a))(@types/node@24.10.9)(@types/pg@8.16.0)(hono@4.12.7)(lightningcss@1.30.2)(typescript@5.9.3)(viem@2.38.5(typescript@5.9.3)(zod@3.25.76))(zod@3.25.76) tsup: specifier: 'catalog:' - version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) typescript: specifier: 'catalog:' version: 5.9.3 @@ -878,13 +881,13 @@ importers: version: 19.2.1 tsup: specifier: ^8.3.6 - version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) typescript: specifier: 'catalog:' version: 5.9.3 vitest: specifier: 'catalog:' - version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) packages/ensnode-sdk: dependencies: @@ -915,7 +918,7 @@ importers: version: 24.10.9 tsup: specifier: ^8.3.6 - version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) typescript: specifier: 'catalog:' version: 5.9.3 @@ -924,7 +927,7 @@ importers: version: 2.38.5(typescript@5.9.3)(zod@4.3.6) vitest: specifier: 'catalog:' - version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) packages/ensrainbow-sdk: dependencies: @@ -940,13 +943,13 @@ importers: version: link:../shared-configs tsup: specifier: 'catalog:' - version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) typescript: specifier: 'catalog:' version: 5.9.3 vitest: specifier: 'catalog:' - version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) packages/integration-test-env: dependencies: @@ -1043,7 +1046,7 @@ importers: version: 8.5.6 postcss-cli: specifier: ^11.0.1 - version: 11.0.1(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6) + version: 11.0.1(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0) react: specifier: 19.2.1 version: 19.2.1 @@ -1052,7 +1055,7 @@ importers: version: 4.1.18 tsup: specifier: ^8.3.6 - version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) typescript: specifier: 'catalog:' version: 5.9.3 @@ -1061,7 +1064,7 @@ importers: version: 2.38.5(typescript@5.9.3)(zod@4.3.6) vitest: specifier: 'catalog:' - version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) packages/ponder-sdk: dependencies: @@ -1077,7 +1080,7 @@ importers: version: 24.10.9 tsup: specifier: 'catalog:' - version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) typescript: specifier: 'catalog:' version: 5.9.3 @@ -1086,7 +1089,7 @@ importers: version: 2.38.5(typescript@5.9.3)(zod@4.3.6) vitest: specifier: 'catalog:' - version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + version: 4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) zod: specifier: 'catalog:' version: 4.3.6 @@ -1132,7 +1135,7 @@ importers: version: 4.12.7 tsup: specifier: 'catalog:' - version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + version: 8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) typescript: specifier: 'catalog:' version: 5.9.3 @@ -1644,6 +1647,9 @@ packages: resolution: {integrity: sha512-kzyuwOAQnXJNLS9PSyrk0CWk35nWJW/zl/6KvnTBMFK65gm7U1/Z5BqjxeapjZCIhQcM/DsrEmcbRwDyXyXK4A==} engines: {node: '>=14'} + '@drizzle-team/brocli@0.10.2': + resolution: {integrity: sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==} + '@electric-sql/pglite@0.2.13': resolution: {integrity: sha512-YRY806NnScVqa21/1L1vaysSQ+0/cAva50z7vlwzaGiBOTS9JhdzIRHN0KfgMhobFAphbznZJ7urMso4RtMBIQ==} @@ -1705,6 +1711,14 @@ packages: resolution: {integrity: sha512-CsFmA3u3c2QoLDTfEpGr4t25fjMU31nyvse7IzWTvb0ZycuPjMjb0fjlheh+PbhBYb9YLugnT2uY6Mwcg1o+Zg==} engines: {node: '>=18.0.0'} + '@esbuild-kit/core-utils@3.3.2': + resolution: {integrity: sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==} + deprecated: 'Merged into tsx: https://tsx.is' + + '@esbuild-kit/esm-loader@2.6.5': + resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==} + deprecated: 'Merged into tsx: https://tsx.is' + '@esbuild/aix-ppc64@0.25.11': resolution: {integrity: sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==} engines: {node: '>=18'} @@ -4869,6 +4883,9 @@ packages: resolution: {integrity: sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==} engines: {node: '>=8.0.0'} + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} @@ -5570,6 +5587,10 @@ packages: resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} engines: {node: '>=10'} + drizzle-kit@0.31.10: + resolution: {integrity: sha512-7OZcmQUrdGI+DUNNsKBn1aW8qSoKuTH7d0mYgSP8bAzdFzKoovxEFnoGQp2dVs82EOJeYycqRtciopszwUf8bw==} + hasBin: true + drizzle-orm@0.41.0: resolution: {integrity: sha512-7A4ZxhHk9gdlXmTdPj/lREtP+3u8KvZ4yEN6MYVxBzZGex5Wtdc+CWSbu7btgF6TB0N+MNPrvW7RKBbxJchs/Q==} peerDependencies: @@ -8046,10 +8067,17 @@ packages: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + source-map@0.5.6: resolution: {integrity: sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA==} engines: {node: '>=0.10.0'} + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + source-map@0.7.6: resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} engines: {node: '>= 12'} @@ -8442,6 +8470,11 @@ packages: engines: {node: '>=18.0.0'} hasBin: true + tsx@4.21.0: + resolution: {integrity: sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==} + engines: {node: '>=18.0.0'} + hasBin: true + tw-animate-css@1.4.0: resolution: {integrity: sha512-7bziOlRqH0hJx80h/3mbicLW7o8qLsH5+RaLR2t+OHM3D0JlWGODQKQ4cxbK7WlvmUxpcj6Kgu6EKqjrGFe3QQ==} @@ -9341,12 +9374,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/mdx@4.3.9(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1))': + '@astrojs/mdx@4.3.9(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1))': dependencies: '@astrojs/markdown-remark': 6.3.8 '@mdx-js/mdx': 3.1.1 acorn: 8.15.0 - astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) es-module-lexer: 1.7.0 estree-util-visit: 2.0.0 hast-util-to-html: 9.0.5 @@ -9364,15 +9397,15 @@ snapshots: dependencies: prismjs: 1.30.0 - '@astrojs/react@4.4.1(@types/node@24.10.9)(@types/react-dom@18.3.7(@types/react@18.3.26))(@types/react@18.3.26)(jiti@2.6.1)(lightningcss@1.30.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(tsx@4.20.6)(yaml@2.8.1)': + '@astrojs/react@4.4.1(@types/node@24.10.9)(@types/react-dom@18.3.7(@types/react@18.3.26))(@types/react@18.3.26)(jiti@2.6.1)(lightningcss@1.30.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(tsx@4.21.0)(yaml@2.8.1)': dependencies: '@types/react': 18.3.26 '@types/react-dom': 18.3.7(@types/react@18.3.26) - '@vitejs/plugin-react': 4.7.0(vite@6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1)) + '@vitejs/plugin-react': 4.7.0(vite@6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) ultrahtml: 1.6.0 - vite: 6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + vite: 6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) transitivePeerDependencies: - '@types/node' - jiti @@ -9393,22 +9426,22 @@ snapshots: stream-replace-string: 2.0.0 zod: 3.25.76 - '@astrojs/starlight-tailwind@4.0.1(@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)))(tailwindcss@4.1.5)': + '@astrojs/starlight-tailwind@4.0.1(@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)))(tailwindcss@4.1.5)': dependencies: - '@astrojs/starlight': 0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)) + '@astrojs/starlight': 0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)) tailwindcss: 4.1.5 - '@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1))': + '@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1))': dependencies: '@astrojs/markdown-remark': 6.3.8 - '@astrojs/mdx': 4.3.9(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)) + '@astrojs/mdx': 4.3.9(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)) '@astrojs/sitemap': 3.6.0 '@pagefind/default-ui': 1.4.0 '@types/hast': 3.0.4 '@types/js-yaml': 4.0.9 '@types/mdast': 4.0.4 - astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) - astro-expressive-code: 0.41.3(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)) + astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) + astro-expressive-code: 0.41.3(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)) bcp-47: 2.1.0 hast-util-from-html: 2.0.3 hast-util-select: 6.0.4 @@ -9431,9 +9464,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/tailwind@6.0.2(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1))(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3)))(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3))': + '@astrojs/tailwind@6.0.2(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1))(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3)))(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3))': dependencies: - astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) autoprefixer: 10.4.21(postcss@8.5.6) postcss: 8.5.6 postcss-load-config: 4.0.2(postcss@8.5.6)(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3)) @@ -9441,9 +9474,9 @@ snapshots: transitivePeerDependencies: - ts-node - '@astrojs/tailwind@6.0.2(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1))(tailwindcss@4.1.5)(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3))': + '@astrojs/tailwind@6.0.2(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1))(tailwindcss@4.1.5)(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3))': dependencies: - astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) autoprefixer: 10.4.21(postcss@8.5.6) postcss: 8.5.6 postcss-load-config: 4.0.2(postcss@8.5.6)(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.9.3)) @@ -10161,6 +10194,8 @@ snapshots: '@ctrl/tinycolor@4.2.0': {} + '@drizzle-team/brocli@0.10.2': {} + '@electric-sql/pglite@0.2.13': {} '@emmetio/abbreviation@2.3.3': @@ -10256,6 +10291,16 @@ snapshots: '@whatwg-node/promise-helpers': 1.3.2 tslib: 2.8.1 + '@esbuild-kit/core-utils@3.3.2': + dependencies: + esbuild: 0.27.2 + source-map-support: 0.5.21 + + '@esbuild-kit/esm-loader@2.6.5': + dependencies: + '@esbuild-kit/core-utils': 3.3.2 + get-tsconfig: 4.13.0 + '@esbuild/aix-ppc64@0.25.11': optional: true @@ -12756,12 +12801,12 @@ snapshots: postcss: 8.5.6 tailwindcss: 4.1.18 - '@tailwindcss/vite@4.1.16(vite@7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1))': + '@tailwindcss/vite@4.1.16(vite@7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': dependencies: '@tailwindcss/node': 4.1.16 '@tailwindcss/oxide': 4.1.16 tailwindcss: 4.1.16 - vite: 7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + vite: 7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) '@tanstack/query-core@5.90.5': {} @@ -13144,7 +13189,7 @@ snapshots: '@ungap/structured-clone@1.3.0': {} - '@vitejs/plugin-react@4.7.0(vite@6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1))': + '@vitejs/plugin-react@4.7.0(vite@6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': dependencies: '@babel/core': 7.28.5 '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.5) @@ -13152,7 +13197,7 @@ snapshots: '@rolldown/pluginutils': 1.0.0-beta.27 '@types/babel__core': 7.20.5 react-refresh: 0.17.0 - vite: 6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + vite: 6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) transitivePeerDependencies: - supports-color @@ -13165,13 +13210,13 @@ snapshots: chai: 6.2.0 tinyrainbow: 3.0.3 - '@vitest/mocker@4.0.5(vite@7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1))': + '@vitest/mocker@4.0.5(vite@7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': dependencies: '@vitest/spy': 4.0.5 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + vite: 7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) '@vitest/pretty-format@4.0.5': dependencies: @@ -13483,9 +13528,9 @@ snapshots: astring@1.9.0: {} - astro-expressive-code@0.41.3(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)): + astro-expressive-code@0.41.3(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)): dependencies: - astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) rehype-expressive-code: 0.41.3 astro-font@1.1.0: {} @@ -13499,9 +13544,9 @@ snapshots: - debug - supports-color - astro-mermaid@1.1.0(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1))(mermaid@11.12.3): + astro-mermaid@1.1.0(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1))(mermaid@11.12.3): dependencies: - astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) import-meta-resolve: 4.2.0 mdast-util-to-string: 4.0.0 mermaid: 11.12.3 @@ -13515,7 +13560,7 @@ snapshots: - prettier-plugin-astro - typescript - astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1): + astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1): dependencies: '@astrojs/compiler': 2.13.0 '@astrojs/internal-helpers': 0.7.5 @@ -13572,8 +13617,8 @@ snapshots: unist-util-visit: 5.0.0 unstorage: 1.17.2 vfile: 6.0.3 - vite: 6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) - vitefu: 1.1.1(vite@6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1)) + vite: 6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) + vitefu: 1.1.1(vite@6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) xxhash-wasm: 1.1.0 yargs-parser: 21.1.1 yocto-spinner: 0.2.3 @@ -13786,6 +13831,8 @@ snapshots: buffer-crc32@1.0.0: {} + buffer-from@1.1.2: {} + buffer@5.7.1: dependencies: base64-js: 1.5.1 @@ -14491,6 +14538,13 @@ snapshots: dotenv@8.6.0: {} + drizzle-kit@0.31.10: + dependencies: + '@drizzle-team/brocli': 0.10.2 + '@esbuild-kit/esm-loader': 2.6.5 + esbuild: 0.25.11 + tsx: 4.21.0 + drizzle-orm@0.41.0(@electric-sql/pglite@0.2.13)(@opentelemetry/api@1.9.0(patch_hash=4b2adeefaf7c22f9987d0a125d69cab900719bec7ed7636648bea6947107033a))(@types/pg@8.16.0)(kysely@0.26.3)(pg@8.16.3): optionalDependencies: '@electric-sql/pglite': 0.2.13 @@ -16897,14 +16951,14 @@ snapshots: - utf-8-validate - zod - postcss-cli@11.0.1(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6): + postcss-cli@11.0.1(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0): dependencies: chokidar: 3.6.0 dependency-graph: 1.0.0 fs-extra: 11.3.3 picocolors: 1.1.1 postcss: 8.5.6 - postcss-load-config: 5.1.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6) + postcss-load-config: 5.1.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0) postcss-reporter: 7.1.0(postcss@8.5.6) pretty-hrtime: 1.0.3 read-cache: 1.0.0 @@ -16935,22 +16989,22 @@ snapshots: postcss: 8.5.6 ts-node: 10.9.2(@types/node@24.10.9)(typescript@5.9.3) - postcss-load-config@5.1.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6): + postcss-load-config@5.1.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0): dependencies: lilconfig: 3.1.3 yaml: 2.8.1 optionalDependencies: jiti: 2.6.1 postcss: 8.5.6 - tsx: 4.20.6 + tsx: 4.21.0 - postcss-load-config@6.0.1(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(yaml@2.8.1): + postcss-load-config@6.0.1(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(yaml@2.8.1): dependencies: lilconfig: 3.1.3 optionalDependencies: jiti: 2.6.1 postcss: 8.5.6 - tsx: 4.20.6 + tsx: 4.21.0 yaml: 2.8.1 postcss-nested@6.2.0(postcss@8.5.6): @@ -17657,8 +17711,15 @@ snapshots: source-map-js@1.2.1: {} + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + source-map@0.5.6: {} + source-map@0.6.1: {} + source-map@0.7.6: {} source-map@0.8.0-beta.0: @@ -17716,13 +17777,13 @@ snapshots: dependencies: type-fest: 0.7.1 - starlight-llms-txt@0.5.1(@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)))(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)): + starlight-llms-txt@0.5.1(@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)))(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)): dependencies: - '@astrojs/mdx': 4.3.9(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)) - '@astrojs/starlight': 0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)) + '@astrojs/mdx': 4.3.9(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)) + '@astrojs/starlight': 0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)) '@types/hast': 3.0.4 '@types/micromatch': 4.0.10 - astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1) + astro: 5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) github-slugger: 2.0.0 hast-util-select: 6.0.4 micromatch: 4.0.8 @@ -17735,9 +17796,9 @@ snapshots: transitivePeerDependencies: - supports-color - starlight-sidebar-topics@0.4.1(@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1))): + starlight-sidebar-topics@0.4.1(@astrojs/starlight@0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1))): dependencies: - '@astrojs/starlight': 0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1)) + '@astrojs/starlight': 0.36.1(astro@5.16.0(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.59.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)) std-env@3.10.0: {} @@ -18097,7 +18158,7 @@ snapshots: tslib@2.8.1: {} - tsup@8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.1): + tsup@8.5.0(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1): dependencies: bundle-require: 5.1.0(esbuild@0.25.11) cac: 6.7.14 @@ -18108,7 +18169,7 @@ snapshots: fix-dts-default-cjs-exports: 1.0.1 joycon: 3.1.1 picocolors: 1.1.1 - postcss-load-config: 6.0.1(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.6)(yaml@2.8.1) + postcss-load-config: 6.0.1(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(yaml@2.8.1) resolve-from: 5.0.0 rollup: 4.59.0 source-map: 0.8.0-beta.0 @@ -18132,6 +18193,13 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + tsx@4.21.0: + dependencies: + esbuild: 0.27.2 + get-tsconfig: 4.13.0 + optionalDependencies: + fsevents: 2.3.3 + tw-animate-css@1.4.0: {} tweetnacl@0.14.5: {} @@ -18424,7 +18492,7 @@ snapshots: fsevents: 2.3.3 lightningcss: 1.30.2 - vite@6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1): + vite@6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1): dependencies: esbuild: 0.25.11 fdir: 6.5.0(picomatch@4.0.3) @@ -18437,7 +18505,7 @@ snapshots: fsevents: 2.3.3 jiti: 2.6.1 lightningcss: 1.30.2 - tsx: 4.20.6 + tsx: 4.21.0 yaml: 2.8.1 vite@7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1): @@ -18456,14 +18524,30 @@ snapshots: tsx: 4.20.6 yaml: 2.8.1 - vitefu@1.1.1(vite@6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1)): + vite@7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1): + dependencies: + esbuild: 0.25.11 + fdir: 6.5.0(picomatch@4.0.3) + picomatch: 4.0.3 + postcss: 8.5.6 + rollup: 4.59.0 + tinyglobby: 0.2.15 + optionalDependencies: + '@types/node': 24.10.9 + fsevents: 2.3.3 + jiti: 2.6.1 + lightningcss: 1.30.2 + tsx: 4.21.0 + yaml: 2.8.1 + + vitefu@1.1.1(vite@6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)): optionalDependencies: - vite: 6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1) + vite: 6.4.1(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) vitest@4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1): dependencies: '@vitest/expect': 4.0.5 - '@vitest/mocker': 4.0.5(vite@7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.1)) + '@vitest/mocker': 4.0.5(vite@7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) '@vitest/pretty-format': 4.0.5 '@vitest/runner': 4.0.5 '@vitest/snapshot': 4.0.5 @@ -18500,6 +18584,46 @@ snapshots: - tsx - yaml + vitest@4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1): + dependencies: + '@vitest/expect': 4.0.5 + '@vitest/mocker': 4.0.5(vite@7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) + '@vitest/pretty-format': 4.0.5 + '@vitest/runner': 4.0.5 + '@vitest/snapshot': 4.0.5 + '@vitest/spy': 4.0.5 + '@vitest/utils': 4.0.5 + debug: 4.4.3 + es-module-lexer: 1.7.0 + expect-type: 1.2.2 + magic-string: 0.30.21 + pathe: 2.0.3 + picomatch: 4.0.3 + std-env: 3.10.0 + tinybench: 2.9.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.15 + tinyrainbow: 3.0.3 + vite: 7.1.12(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/debug': 4.1.12 + '@types/node': 24.10.9 + jsdom: 27.0.1(postcss@8.5.6) + transitivePeerDependencies: + - jiti + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + volar-service-css@0.0.65(@volar/language-service@2.4.23): dependencies: vscode-css-languageservice: 6.3.8 From 82feb703378bbeb7f9995e863ccd412f8bb9eaac Mon Sep 17 00:00:00 2001 From: Tomasz Kopacki Date: Tue, 17 Mar 2026 11:55:08 +0100 Subject: [PATCH 2/8] Migration: initialize ENSNode Schema in ENSDb. --- .../0000_cultured_captain_cross.sql | 8 +++ .../migrations/meta/0000_snapshot.json | 55 +++++++++++++++++++ .../ensdb-sdk/migrations/meta/_journal.json | 13 +++++ 3 files changed, 76 insertions(+) create mode 100644 packages/ensdb-sdk/migrations/0000_cultured_captain_cross.sql create mode 100644 packages/ensdb-sdk/migrations/meta/0000_snapshot.json create mode 100644 packages/ensdb-sdk/migrations/meta/_journal.json diff --git a/packages/ensdb-sdk/migrations/0000_cultured_captain_cross.sql b/packages/ensdb-sdk/migrations/0000_cultured_captain_cross.sql new file mode 100644 index 0000000000..cb83413346 --- /dev/null +++ b/packages/ensdb-sdk/migrations/0000_cultured_captain_cross.sql @@ -0,0 +1,8 @@ +CREATE SCHEMA IF NOT EXISTS ensnode; + +CREATE TABLE "ensnode"."metadata" ( + "ens_indexer_schema_name" text NOT NULL, + "key" text NOT NULL, + "value" jsonb NOT NULL, + CONSTRAINT "metadata_pkey" PRIMARY KEY("ens_indexer_schema_name","key") +); diff --git a/packages/ensdb-sdk/migrations/meta/0000_snapshot.json b/packages/ensdb-sdk/migrations/meta/0000_snapshot.json new file mode 100644 index 0000000000..530d0e3b9b --- /dev/null +++ b/packages/ensdb-sdk/migrations/meta/0000_snapshot.json @@ -0,0 +1,55 @@ +{ + "id": "d661dcae-f64d-4ecd-a4da-3d5783e17e2c", + "prevId": "00000000-0000-0000-0000-000000000000", + "version": "7", + "dialect": "postgresql", + "tables": { + "ensnode.metadata": { + "name": "metadata", + "schema": "ensnode", + "columns": { + "ens_indexer_schema_name": { + "name": "ens_indexer_schema_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": { + "metadata_pkey": { + "name": "metadata_pkey", + "columns": ["ens_indexer_schema_name", "key"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/packages/ensdb-sdk/migrations/meta/_journal.json b/packages/ensdb-sdk/migrations/meta/_journal.json new file mode 100644 index 0000000000..46d9e212a3 --- /dev/null +++ b/packages/ensdb-sdk/migrations/meta/_journal.json @@ -0,0 +1,13 @@ +{ + "version": "7", + "dialect": "postgresql", + "entries": [ + { + "idx": 0, + "version": "7", + "when": 1773743108514, + "tag": "0000_cultured_captain_cross", + "breakpoints": true + } + ] +} From 9b96470d7f6df7a75e199f9b6aa2a2c219341015 Mon Sep 17 00:00:00 2001 From: Tomasz Kopacki Date: Tue, 17 Mar 2026 11:55:46 +0100 Subject: [PATCH 3/8] docs(changeset): Introduced toolkit for managing ENSDb migrations for ENSNode Schema. --- .changeset/tasty-pigs-shine.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tasty-pigs-shine.md diff --git a/.changeset/tasty-pigs-shine.md b/.changeset/tasty-pigs-shine.md new file mode 100644 index 0000000000..f3d739288e --- /dev/null +++ b/.changeset/tasty-pigs-shine.md @@ -0,0 +1,5 @@ +--- +"@ensnode/ensdb-sdk": minor +--- + +Introduced toolkit for managing ENSDb migrations for ENSNode Schema. From 1ad90025ab93825839552de4673497f6d2e44116 Mon Sep 17 00:00:00 2001 From: Tomek Kopacki Date: Tue, 17 Mar 2026 12:14:14 +0100 Subject: [PATCH 4/8] Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- packages/ensdb-sdk/README.md | 6 +++--- packages/ensdb-sdk/package.json | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/ensdb-sdk/README.md b/packages/ensdb-sdk/README.md index 91e8e841f1..f13abbe0f5 100644 --- a/packages/ensdb-sdk/README.md +++ b/packages/ensdb-sdk/README.md @@ -6,7 +6,7 @@ This package is a utility library for interacting with ENSDb. ### ENSIndexer Schema -This schema consist of database object definitions exported from `src/ensindexer` module. +This schema consists of database object definitions exported from `src/ensindexer` module. Defining database objects is done by using functionality from `ponder` package. #### Applying schema definition updates @@ -15,7 +15,7 @@ Updating database object definitions in ENSIndexer Schema _does not_ require any ### ENSNode Schema -This schema consist of database object definitions exported from `src/ensnode` module. +This schema consists of database object definitions exported from `src/ensnode` module. Defining database objects is done by using functionality from `drizzle-orm` package. #### Applying schema definition updates @@ -28,4 +28,4 @@ pnpm -F @ensnode/ensdb-sdk drizzle-kit:generate ``` This command will update files inside the `migrations` directory, including SQL files. -The `migrations` directory can be later reference by application runtime (i.e. ENSIndexer app) in order to execute pending SQL migrations for ENSNode Schema in ENSDb. +The `migrations` directory can later be referenced by the application runtime (i.e. ENSIndexer app) in order to execute pending SQL migrations for ENSNode Schema in ENSDb. diff --git a/packages/ensdb-sdk/package.json b/packages/ensdb-sdk/package.json index 4b7936c03d..b820b4972a 100644 --- a/packages/ensdb-sdk/package.json +++ b/packages/ensdb-sdk/package.json @@ -21,7 +21,9 @@ "./ensnode": "./src/ensnode/index.ts" }, "files": [ - "dist" + "dist", + "migrations", + "migrations/meta" ], "publishConfig": { "access": "public", From 177324a5dbcc9476f3e845bc08762c874cd08668 Mon Sep 17 00:00:00 2001 From: Tomek Kopacki Date: Tue, 17 Mar 2026 15:32:51 +0100 Subject: [PATCH 5/8] Apply suggestions from code review Co-authored-by: lightwalker.eth <126201998+lightwalker-eth@users.noreply.github.com> --- packages/ensdb-sdk/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ensdb-sdk/README.md b/packages/ensdb-sdk/README.md index f13abbe0f5..64c658df9f 100644 --- a/packages/ensdb-sdk/README.md +++ b/packages/ensdb-sdk/README.md @@ -6,16 +6,16 @@ This package is a utility library for interacting with ENSDb. ### ENSIndexer Schema -This schema consists of database object definitions exported from `src/ensindexer` module. +This schema consists of database object definitions exported from the `src/ensindexer` module. Defining database objects is done by using functionality from `ponder` package. #### Applying schema definition updates -Updating database object definitions in ENSIndexer Schema _does not_ require any extra steps. ENSIndexer app is built on top of Ponder app. The Ponder app runtime takes care of generating migrations and having them executed during application runtime. In other words, ENSIndexer Schema in ENSDb gets auto-updated when ENSIndexer app starts. +Updating database object definitions in the ENSIndexer Schema _does not_ require manual database migrations. The ENSIndexer app delegates to its imported Ponder package to execute database migrations on an ENSIndexer Schema. In other words, each ENSIndexer Schema in ENSDb is automatically migrated by Ponder when ENSIndexer starts. ### ENSNode Schema -This schema consists of database object definitions exported from `src/ensnode` module. +This schema consists of database object definitions exported from the `src/ensnode` module. Defining database objects is done by using functionality from `drizzle-orm` package. #### Applying schema definition updates From 8f6994d9411733a1f2dbb29bc523155ff8219ffa Mon Sep 17 00:00:00 2001 From: Tomasz Kopacki Date: Wed, 18 Mar 2026 07:46:47 +0100 Subject: [PATCH 6/8] Optimize readme file for ENSDb SDK for clarity This update was co-created with GPT-5.4 to ensure clarity of the shared ideas --- packages/ensdb-sdk/README.md | 54 +++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 16 deletions(-) diff --git a/packages/ensdb-sdk/README.md b/packages/ensdb-sdk/README.md index 64c658df9f..4d3b4c0a4e 100644 --- a/packages/ensdb-sdk/README.md +++ b/packages/ensdb-sdk/README.md @@ -1,31 +1,53 @@ # ENSDb SDK -This package is a utility library for interacting with ENSDb. +This package defines the database schema used by ENSDb. -## Database schema definitions +It exposes two schema modules because `ENSIndexer` needs two different kinds of tables: -### ENSIndexer Schema +- ENSIndexer Schema for indexing onchain data +- ENSNode Schema for indexing offchain data -This schema consists of database object definitions exported from the `src/ensindexer` module. -Defining database objects is done by using functionality from `ponder` package. +## ENSIndexer Schema -#### Applying schema definition updates +Source: `packages/ensdb-sdk/src/ensindexer` -Updating database object definitions in the ENSIndexer Schema _does not_ require manual database migrations. The ENSIndexer app delegates to its imported Ponder package to execute database migrations on an ENSIndexer Schema. In other words, each ENSIndexer Schema in ENSDb is automatically migrated by Ponder when ENSIndexer starts. +This database schema is required by the Ponder app that powers `ENSIndexer`. -### ENSNode Schema +Ponder requires `ponder.schema.ts` to follow specific rules: `https://ponder.sh/docs/api-reference/ponder/schema#file-requirements`. -This schema consists of database object definitions exported from the `src/ensnode` module. -Defining database objects is done by using functionality from `drizzle-orm` package. +The most important rule here is that tables must be defined with `onchainTable()`, not with Drizzle's `pgSchema(schemaName).table()`. -#### Applying schema definition updates +Both APIs produce Drizzle table objects, but there is one important difference: `onchainTable()` does not hardcode the Postgres schema name up front. Ponder chooses the schema name dynamically from its configuration. -Updating database object definitions in ENSNode Schema _does_ require an extra step: generating SQL queries to be executed for ENSNode Schema in ENSDb. +Ponder is also responsible for initializing and migrating the ENSIndexer Schema. It reads this schema through `apps/ensindexer/ponder/ponder.schema.ts`, which re-exports `packages/ensdb-sdk/src/ensindexer`. -Generating SQL queries can be done with the following CLI command: -``` +### When it changes + +Update files in `src/ensindexer`, then start `ENSIndexer`. Ponder handles the rest. + +## ENSNode Schema + +Source: `packages/ensdb-sdk/src/ensnode` + +This schema is also required by `ENSIndexer`, but for offchain data rather than onchain data. + +It uses Drizzle's Postgres schema APIs such as `pgSchema("ensnode").table()`. Unlike the ENSIndexer Schema, the database schema name is fixed up front as `ensnode`. + +### When it changes + +You must generate migration files: + +```bash pnpm -F @ensnode/ensdb-sdk drizzle-kit:generate ``` -This command will update files inside the `migrations` directory, including SQL files. -The `migrations` directory can later be referenced by the application runtime (i.e. ENSIndexer app) in order to execute pending SQL migrations for ENSNode Schema in ENSDb. +This updates `packages/ensdb-sdk/migrations`. `ENSIndexer` currently takes responsibility for applying those migrations and initializing the ENSNode Schema. + +## Rule of thumb + +- `onchainTable()` + schema name chosen by Ponder = ENSIndexer Schema +- `pgSchema().table()` + fixed schema name + generated migrations = ENSNode Schema + +## Current transition + +`packages/ensdb-sdk/src/ensindexer/index.ts` still re-exports `ensnode-metadata.schema.ts` as a temporary bridge until ENSNode Schema migrations are fully in place. From 7f477c519082f0237da93799dd4fab3cd1fc8738 Mon Sep 17 00:00:00 2001 From: Tomasz Kopacki Date: Wed, 18 Mar 2026 16:49:19 +0100 Subject: [PATCH 7/8] Revert updates to README.md file Docs for ENSDb SDK will be added as part of ENSNode Docs website after the ENSDb SDK intergration is completed on ENSApi and ENSIndexer end. --- packages/ensdb-sdk/README.md | 52 +----------------------------------- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/packages/ensdb-sdk/README.md b/packages/ensdb-sdk/README.md index 4d3b4c0a4e..f2868a92f8 100644 --- a/packages/ensdb-sdk/README.md +++ b/packages/ensdb-sdk/README.md @@ -1,53 +1,3 @@ # ENSDb SDK -This package defines the database schema used by ENSDb. - -It exposes two schema modules because `ENSIndexer` needs two different kinds of tables: - -- ENSIndexer Schema for indexing onchain data -- ENSNode Schema for indexing offchain data - -## ENSIndexer Schema - -Source: `packages/ensdb-sdk/src/ensindexer` - -This database schema is required by the Ponder app that powers `ENSIndexer`. - -Ponder requires `ponder.schema.ts` to follow specific rules: `https://ponder.sh/docs/api-reference/ponder/schema#file-requirements`. - -The most important rule here is that tables must be defined with `onchainTable()`, not with Drizzle's `pgSchema(schemaName).table()`. - -Both APIs produce Drizzle table objects, but there is one important difference: `onchainTable()` does not hardcode the Postgres schema name up front. Ponder chooses the schema name dynamically from its configuration. - -Ponder is also responsible for initializing and migrating the ENSIndexer Schema. It reads this schema through `apps/ensindexer/ponder/ponder.schema.ts`, which re-exports `packages/ensdb-sdk/src/ensindexer`. - -### When it changes - -Update files in `src/ensindexer`, then start `ENSIndexer`. Ponder handles the rest. - -## ENSNode Schema - -Source: `packages/ensdb-sdk/src/ensnode` - -This schema is also required by `ENSIndexer`, but for offchain data rather than onchain data. - -It uses Drizzle's Postgres schema APIs such as `pgSchema("ensnode").table()`. Unlike the ENSIndexer Schema, the database schema name is fixed up front as `ensnode`. - -### When it changes - -You must generate migration files: - -```bash -pnpm -F @ensnode/ensdb-sdk drizzle-kit:generate -``` - -This updates `packages/ensdb-sdk/migrations`. `ENSIndexer` currently takes responsibility for applying those migrations and initializing the ENSNode Schema. - -## Rule of thumb - -- `onchainTable()` + schema name chosen by Ponder = ENSIndexer Schema -- `pgSchema().table()` + fixed schema name + generated migrations = ENSNode Schema - -## Current transition - -`packages/ensdb-sdk/src/ensindexer/index.ts` still re-exports `ensnode-metadata.schema.ts` as a temporary bridge until ENSNode Schema migrations are fully in place. +This package is a utility library for interacting with ENSDb. From 825972ef1a9d28ef3d18fce69d9f09fa3cc267d2 Mon Sep 17 00:00:00 2001 From: Tomasz Kopacki Date: Wed, 18 Mar 2026 19:49:32 +0100 Subject: [PATCH 8/8] Apply pr feedback --- packages/ensdb-sdk/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/ensdb-sdk/package.json b/packages/ensdb-sdk/package.json index b820b4972a..8626a194c8 100644 --- a/packages/ensdb-sdk/package.json +++ b/packages/ensdb-sdk/package.json @@ -22,8 +22,7 @@ }, "files": [ "dist", - "migrations", - "migrations/meta" + "migrations" ], "publishConfig": { "access": "public",