@theobourgeois/ytdb 0.2.19 → 0.3.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.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +9 -5
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +4 -4
- package/.next/react-loadable-manifest.json +12 -1
- package/.next/routes-manifest.json +35 -0
- package/.next/server/app/[connectionId]/[schema]/[table]/page.js +1 -1
- package/.next/server/app/[connectionId]/[schema]/[table]/page.js.nft.json +1 -1
- package/.next/server/app/[connectionId]/[schema]/[table]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[connectionId]/diff/page.js +3 -3
- package/.next/server/app/[connectionId]/diff/page.js.nft.json +1 -1
- package/.next/server/app/[connectionId]/diff/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[connectionId]/migrations/(index)/page.js +1 -0
- package/.next/server/app/[connectionId]/migrations/(index)/page.js.nft.json +1 -0
- package/.next/server/app/[connectionId]/migrations/(index)/page_client-reference-manifest.js +1 -0
- package/.next/server/app/[connectionId]/migrations/(index)/timeline/page.js +1 -0
- package/.next/server/app/[connectionId]/migrations/(index)/timeline/page.js.nft.json +1 -0
- package/.next/server/app/[connectionId]/migrations/(index)/timeline/page_client-reference-manifest.js +1 -0
- package/.next/server/app/[connectionId]/migrations/[setId]/diagram/page.js +1 -0
- package/.next/server/app/[connectionId]/migrations/[setId]/diagram/page.js.nft.json +1 -0
- package/.next/server/app/[connectionId]/migrations/[setId]/diagram/page_client-reference-manifest.js +1 -0
- package/.next/server/app/[connectionId]/migrations/[setId]/page.js +1 -1
- package/.next/server/app/[connectionId]/migrations/[setId]/page.js.nft.json +1 -1
- package/.next/server/app/[connectionId]/migrations/[setId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[connectionId]/migrations/[setId]/schema/page.js +1 -0
- package/.next/server/app/[connectionId]/migrations/[setId]/schema/page.js.nft.json +1 -0
- package/.next/server/app/[connectionId]/migrations/[setId]/schema/page_client-reference-manifest.js +1 -0
- package/.next/server/app/[connectionId]/migrations/[setId]/timeline/page.js +1 -0
- package/.next/server/app/[connectionId]/migrations/[setId]/timeline/page.js.nft.json +1 -0
- package/.next/server/app/[connectionId]/migrations/[setId]/timeline/page_client-reference-manifest.js +1 -0
- package/.next/server/app/[connectionId]/page.js +1 -1
- package/.next/server/app/[connectionId]/page.js.nft.json +1 -1
- package/.next/server/app/[connectionId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[connectionId]/query/page.js +1 -1
- package/.next/server/app/[connectionId]/query/page.js.nft.json +1 -1
- package/.next/server/app/[connectionId]/query/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +7 -7
- package/.next/server/app/_not-found.segments/_full.segment.rsc +7 -7
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/api/activity/route.js +2 -2
- package/.next/server/app/api/adopt/route.js +1 -1
- package/.next/server/app/api/cell/route.js +2 -2
- package/.next/server/app/api/definition/route.js +2 -2
- package/.next/server/app/api/delete-rows/route.js +2 -2
- package/.next/server/app/api/detect/route.js +1 -1
- package/.next/server/app/api/health/route.js +1 -1
- package/.next/server/app/api/insert-row/route.js +2 -2
- package/.next/server/app/api/ledger/route.js +1 -1
- package/.next/server/app/api/lookup/route.js +2 -2
- package/.next/server/app/api/migrate/route.js +1 -1
- package/.next/server/app/api/note/route.js +1 -1
- package/.next/server/app/api/query/route.js +2 -2
- package/.next/server/app/api/reconcile/route.js +2 -2
- package/.next/server/app/api/rehearse/route.js +1 -1
- package/.next/server/app/api/related/route.js +2 -2
- package/.next/server/app/api/repo/route.js +1 -1
- package/.next/server/app/api/rows/route.js +2 -2
- package/.next/server/app/api/schema/route.js +1 -1
- package/.next/server/app/api/tables/route.js +2 -2
- package/.next/server/app/api/timeline/route.js +1 -1
- package/.next/server/app/api/update-row/route.js +1 -1
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/icon.svg/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +8 -8
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/index.segments/_full.segment.rsc +8 -8
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +9 -5
- package/.next/server/chunks/1421.js +1 -1
- package/.next/server/chunks/4809.js +1 -0
- package/.next/server/chunks/535.js +1 -0
- package/.next/server/chunks/5529.js +1 -0
- package/.next/server/chunks/5816.js +1 -1
- package/.next/server/chunks/6729.js +1 -1
- package/.next/server/chunks/7928.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/middleware.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/{PPqM7ay-YN8BBp1e_HK15 → NB4JOC2i3ctixKpjpc7WH}/_buildManifest.js +1 -1
- package/.next/static/chunks/1413-1888e486022200cf.js +1 -0
- package/.next/static/chunks/1a258343.4407cfad5d6b3688.js +1 -0
- package/.next/static/chunks/{223-a4fca67d979d899d.js → 223-ae41c085e76173d8.js} +1 -1
- package/.next/static/chunks/228-332e8b6e327f10da.js +1 -0
- package/.next/static/chunks/544-624e05bf7e7a38d4.js +1 -0
- package/.next/static/chunks/577-d6d889d30c9375d9.js +1 -0
- package/.next/static/chunks/6090-97474bba31339e8e.js +1 -0
- package/.next/static/chunks/9146.9656b5ec316de71a.js +1 -0
- package/.next/static/chunks/91dbc596.26f4ecb79a1f7c01.js +1 -0
- package/.next/static/chunks/9406.9203511499c8bf43.js +1 -0
- package/.next/static/chunks/app/[connectionId]/[schema]/[table]/page-37b33d781877f0a5.js +1 -0
- package/.next/static/chunks/app/[connectionId]/diff/page-215e1f750956eecb.js +10 -0
- package/.next/static/chunks/app/[connectionId]/{layout-06d736d4773bd4a8.js → layout-b8ad40b3da6824ed.js} +1 -1
- package/.next/static/chunks/app/[connectionId]/migrations/(index)/layout-2635a5499e0b928c.js +1 -0
- package/.next/static/chunks/app/[connectionId]/migrations/(index)/page-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/[connectionId]/migrations/(index)/timeline/page-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/[connectionId]/migrations/[setId]/diagram/page-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/[connectionId]/migrations/[setId]/layout-31e703f1a9beebf7.js +1 -0
- package/.next/static/chunks/app/[connectionId]/migrations/[setId]/page-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/[connectionId]/migrations/[setId]/schema/page-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/[connectionId]/migrations/[setId]/timeline/page-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/[connectionId]/page-78a06e32a2658d3b.js +1 -0
- package/.next/static/chunks/app/[connectionId]/query/page-53c2d6f97a05d957.js +1 -0
- package/.next/static/chunks/app/_global-error/page-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/activity/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/adopt/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/cell/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/definition/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/delete-rows/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/detect/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/health/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/insert-row/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/ledger/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/lookup/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/migrate/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/note/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/query/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/reconcile/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/rehearse/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/related/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/repo/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/rows/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/schema/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/tables/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/timeline/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/api/update-row/route-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/app/layout-2ed8b1f837adb32a.js +1 -0
- package/.next/static/chunks/app/page-52545dcc822c61da.js +2 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-e85d6ff71aeabe8d.js +1 -0
- package/.next/static/chunks/webpack-6451386e3f1b2ec9.js +1 -0
- package/.next/static/css/0e3fe8b2c0252430.css +1 -0
- package/.next/static/css/{e02ab5db9ff2dca2.css → 5df9ea52964d1443.css} +1 -1
- package/.next/static/css/6ada1421df91d770.css +21 -0
- package/README.md +5 -351
- package/bin/ytdb.mjs +4 -9
- package/package.json +3 -1
- package/.next/server/app/[connectionId]/migrations/page.js +0 -1
- package/.next/server/app/[connectionId]/migrations/page.js.nft.json +0 -1
- package/.next/server/app/[connectionId]/migrations/page_client-reference-manifest.js +0 -1
- package/.next/server/chunks/7593.js +0 -1
- package/.next/static/chunks/1520-1d9fc8b9ea29f3aa.js +0 -1
- package/.next/static/chunks/1981-806ce42b1641772f.js +0 -1
- package/.next/static/chunks/6782-c8b44f7f0d19d8e4.js +0 -1
- package/.next/static/chunks/7709-b2eee040599bab79.js +0 -1
- package/.next/static/chunks/9243-585cdd3c297cf117.js +0 -1
- package/.next/static/chunks/9532-860dc97ac3c3ff31.js +0 -1
- package/.next/static/chunks/app/[connectionId]/[schema]/[table]/page-7bed5765c93ce736.js +0 -1
- package/.next/static/chunks/app/[connectionId]/diff/page-e3e50546820ed5d5.js +0 -10
- package/.next/static/chunks/app/[connectionId]/migrations/[setId]/page-86a263e7e4a08d61.js +0 -1
- package/.next/static/chunks/app/[connectionId]/migrations/page-fc5dcf1404df5c65.js +0 -1
- package/.next/static/chunks/app/[connectionId]/page-8f68a2646e2f3eaa.js +0 -1
- package/.next/static/chunks/app/[connectionId]/query/page-55618bbb32f70fee.js +0 -1
- package/.next/static/chunks/app/_global-error/page-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/activity/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/adopt/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/cell/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/definition/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/delete-rows/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/detect/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/health/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/insert-row/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/ledger/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/lookup/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/migrate/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/note/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/query/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/reconcile/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/rehearse/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/related/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/repo/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/rows/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/schema/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/tables/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/timeline/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/api/update-row/route-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/app/layout-e3fdecae5544dc60.js +0 -1
- package/.next/static/chunks/app/page-957b7639b047ba08.js +0 -2
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-ad3ae203c81de67b.js +0 -1
- package/.next/static/chunks/webpack-34eb118f56295776.js +0 -1
- package/.next/static/css/ab9c0ea2c2569929.css +0 -1
- package/public/screenshots/ytdb-command-palette.png +0 -0
- package/public/screenshots/ytdb-connection.png +0 -0
- package/public/screenshots/ytdb-explorer.png +0 -0
- /package/.next/static/{PPqM7ay-YN8BBp1e_HK15 → NB4JOC2i3ctixKpjpc7WH}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -1,357 +1,11 @@
|
|
|
1
1
|
# YTDB
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
YTDB is a fast, local-first PostgreSQL browser and migration tool. Run `npx @theobourgeois/ytdb` and it opens in your browser, with every query going through a small process on your own machine, so connection strings and data never leave it. Point it at your repo's migrations folder and it shows where dev, staging and prod each stand on every migration, lets you apply or revert them one step at a time with notes for whoever runs them next, and keeps a timeline of every run in the database itself. Each environment gets its own color, so you always know whether you're about to touch prod. It also browses and edits tables, follows foreign keys, runs read-only SQL, and diffs two databases' schemas into migration SQL.
|
|
4
4
|
|
|
5
|
-

|
|
6
6
|
|
|
7
|
-
|
|
7
|
+

|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- Run read-only SQL queries with capped results and searchable local history
|
|
11
|
-
- Search, filter, sort, and paginate rows
|
|
12
|
-
- Edit cells inline, insert new rows, and delete selected rows
|
|
13
|
-
- Follow foreign keys, inspect related records, and peek at complete rows
|
|
14
|
-
- Pin, hide, reorder, and resize columns
|
|
15
|
-
- Export the current result set as CSV or JSON
|
|
16
|
-
- View table and view definitions
|
|
17
|
-
- Switch between multiple saved connections and share layouts between them
|
|
18
|
-
- Compare two connections' schemas and generate the migration SQL that closes the gap
|
|
19
|
-
- Import a folder of migrations and apply or revert them one at a time or all at once, with each
|
|
20
|
-
environment's history recorded in the database itself
|
|
21
|
-
- Import or export your workspace configuration
|
|
22
|
-
- Choose from six built-in themes
|
|
9
|
+

|
|
23
10
|
|
|
24
|
-

|
|
31
|
-
|
|
32
|
-
The screenshots use a disposable local database with fictional product and company names. No production data or credentials are included in this repository.
|
|
33
|
-
|
|
34
|
-
## Compare two databases
|
|
35
|
-
|
|
36
|
-
Open **Compare schema** in a connection's sidebar (<kbd>⌘</kbd>+<kbd>⇧</kbd>+<kbd>D</kbd>) to diff it
|
|
37
|
-
against another saved connection — dev against prod, say. Connections that already share a layout are
|
|
38
|
-
offered first, since those are the same database in another environment.
|
|
39
|
-
|
|
40
|
-
The **Changes** pane lists every table, column, index, constraint, trigger, view, enum, function,
|
|
41
|
-
extension, and schema that differs, and the **Migration SQL** pane writes the DDL that would bring the
|
|
42
|
-
other database in line. Nothing is ever executed from here: copy the script into whatever migration
|
|
43
|
-
tool the project already uses. DROP statements are withheld until you ask for them.
|
|
44
|
-
|
|
45
|
-
## Run a folder of migrations
|
|
46
|
-
|
|
47
|
-
**Migrations** in a connection's sidebar (<kbd>⌘</kbd>+<kbd>⇧</kbd>+<kbd>M</kbd>) lists the
|
|
48
|
-
migrations you have. Each one is a folder of SQL and a page of its own: open it to apply it to an
|
|
49
|
-
environment, see where every environment stands on it, or revert it. The list shows that standing at
|
|
50
|
-
a glance — `dev 8/8`, `prod 0/8` — so a migration that has been through dev but not prod is obvious
|
|
51
|
-
without opening anything.
|
|
52
|
-
|
|
53
|
-
### Read straight from your repo
|
|
54
|
-
|
|
55
|
-
Choose **Read from a folder** and give it the path to your project's migrations directory, say
|
|
56
|
-
`~/code/app/src/lib/supabase/migrations`. Every folder inside it that holds `.sql` files is one
|
|
57
|
-
migration, named after the folder — `key-claims/apply/0001_create_keys.sql` is version 0001 of
|
|
58
|
-
`key-claims`, with `key-claims/revert/0001_create_keys.sql` as its undo. A flat folder of `.sql`
|
|
59
|
-
files is one migration named after the folder itself.
|
|
60
|
-
|
|
61
|
-
Nothing is imported or remembered. The folder is read off the disk by the YTDB running on your
|
|
62
|
-
machine every time the page opens, so the list is whatever is on the branch you have checked out,
|
|
63
|
-
and the header says which branch that is. Switch branches and the list follows. The path is kept per
|
|
64
|
-
set of linked connections, so dev and prod of one project read the same folder and another project
|
|
65
|
-
reads its own.
|
|
66
|
-
|
|
67
|
-
### Leaving a note on how to run it
|
|
68
|
-
|
|
69
|
-
**Add note** in a migration's `⋯` menu leaves word for whoever runs it next — *apply 0001–0007,
|
|
70
|
-
deploy the app, then apply 0008*. It sits above the files on the migration's page, and again in the
|
|
71
|
-
confirmation before anything runs. For a migration read from a folder the note is the `README.md`
|
|
72
|
-
(or `NOTES.md`) beside its SQL, so it is committed with it and follows the branch; a README already
|
|
73
|
-
there is picked up as the note. An imported migration keeps its note in the browser. Emptying the
|
|
74
|
-
note removes it.
|
|
75
|
-
|
|
76
|
-
### The ledger
|
|
77
|
-
|
|
78
|
-
Applying a migration records it in a small table the database keeps for itself,
|
|
79
|
-
`maintenance.ytdb_migrations`, created on the first apply. A row is keyed by the migration's set and
|
|
80
|
-
its version together, since every folder numbers its files from 0001. The SQL that ran — and its
|
|
81
|
-
revert SQL — is stored in the row alongside it, so a migration belongs to the databases and not to
|
|
82
|
-
the browser that happened to have the folder. Open YTDB somewhere else and the ones your databases
|
|
83
|
-
have run are listed with how far each environment got; **Open** rebuilds one from the ledger, ready
|
|
84
|
-
to apply to the environment that is behind, or revert.
|
|
85
|
-
|
|
86
|
-
A ledger written by an earlier YTDB, keyed on version alone, is moved onto the new key the next time
|
|
87
|
-
anything is written to it. Rows written before YTDB stored SQL are still listed, but can only be
|
|
88
|
-
rebuilt from the folder.
|
|
89
|
-
|
|
90
|
-
### Adopting a database that was migrated by hand
|
|
91
|
-
|
|
92
|
-
A database that has been running for a while has already had most of the folder applied to it,
|
|
93
|
-
just not through YTDB, so its ledger is empty and everything shows as pending. **Mark everything as
|
|
94
|
-
applied** in the list's menu reads the database's schema first and sorts the migrations by what it
|
|
95
|
-
finds: the ones whose tables, columns, indexes, types, functions, policies, and triggers are all
|
|
96
|
-
there; the ones only partly there; the ones that leave no trace in the schema (data backfills,
|
|
97
|
-
seeds, grants); and the ones not there at all. The first group is ticked for you; open any group to
|
|
98
|
-
see what is missing for each migration and tick or untick as you know better. Marking writes one
|
|
99
|
-
ledger row per ticked migration, in one transaction, without running any SQL, and never touches a
|
|
100
|
-
row that is already there. Do it once per environment from a checkout of your main branch, and from
|
|
101
|
-
then on only what is genuinely new shows as pending.
|
|
102
|
-
|
|
103
|
-
### Finding what to work on
|
|
104
|
-
|
|
105
|
-
The list has a search box and a status filter — not fully applied, not started anywhere, applied
|
|
106
|
-
everywhere, or pending on one environment in particular. Both are remembered per set of linked
|
|
107
|
-
connections, so the view you left is the view you come back to.
|
|
108
|
-
|
|
109
|
-
Drop in whatever you have to start one. A flat folder of migrations is enough:
|
|
110
|
-
|
|
111
|
-
```text
|
|
112
|
-
migrations/
|
|
113
|
-
0001_create_customers.sql
|
|
114
|
-
0002_create_orders.sql
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
If you keep reverts, put them in a sibling folder and they pair up by the version each name starts
|
|
118
|
-
with, whatever the rest of the name says:
|
|
119
|
-
|
|
120
|
-
```text
|
|
121
|
-
shop-migrations/
|
|
122
|
-
apply/ 0001_create_customers.sql 0002_create_orders.sql
|
|
123
|
-
revert/ 0001_create_customers.sql 0002_create_orders.sql
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
`up/` and `down/` work as folder names too, as do `0002_create_orders.up.sql` / `.down.sql` suffixes
|
|
127
|
-
in a flat folder. **Reverts are optional** — a migration without one applies like any other, and only
|
|
128
|
-
Revert is unavailable for it.
|
|
129
|
-
|
|
130
|
-
Files do not have to arrive together. Dropping files onto an open migration folds them in: new
|
|
131
|
-
versions are added, versions already there have their SQL refreshed, and a revert file finds the
|
|
132
|
-
version it belongs to. So you can start one from a folder, add a stray file later, and attach a
|
|
133
|
-
revert from a row's `⋯` menu whenever you write one. **New migration** starts an empty one.
|
|
134
|
-
|
|
135
|
-
Nothing is appended into one script. Each migration runs on its own, in a transaction, together with
|
|
136
|
-
the row that records it — so a migration that fails halfway leaves the database and the ledger exactly
|
|
137
|
-
as they were.
|
|
138
|
-
|
|
139
|
-
One database at a time is the target, named in the header and in every button: **Running against dev**,
|
|
140
|
-
**Apply 6 to dev**. Its column in the list is the tinted one. Switching target is one click on another
|
|
141
|
-
environment's column, which opens that connection. **Apply** on a row runs everything still pending up
|
|
142
|
-
to and including it, so a target can never end up with a gap in the middle; the `⋯` menu has
|
|
143
|
-
*apply only this one* for the rare out-of-order case, and *revert back through here* going the other way.
|
|
144
|
-
|
|
145
|
-
To run a handful, tick them — the box in the column header selects them all, and shift-click ticks
|
|
146
|
-
everything between. While anything is ticked, the header's Apply, *Mark as already applied*, and
|
|
147
|
-
*Revert* cover only the ticked ones, in order, and the selection clears once they have all run.
|
|
148
|
-
|
|
149
|
-
A file edited after a database ran it is flagged as drifted, and opening its row shows **Changes**: a
|
|
150
|
-
git-style diff of the SQL that database actually ran — kept in its ledger — against the file as it
|
|
151
|
-
is now.
|
|
152
|
-
|
|
153
|
-
### Which environments have which migrations
|
|
154
|
-
|
|
155
|
-
Each database keeps its own ledger in `maintenance.ytdb_migrations`, written as part of the same
|
|
156
|
-
transaction as the migration. Dev is not asked what prod has run — prod is. Connections
|
|
157
|
-
[sharing a layout](#compare-two-databases) are the same database in another environment, so their
|
|
158
|
-
ledgers are read side by side: every migration shows where it has landed and where it has not, and
|
|
159
|
-
the environment strip totals up how far behind each one is. A file edited after it was applied is
|
|
160
|
-
flagged as drifted rather than quietly counted as done, and rows in a database that have no file in
|
|
161
|
-
the folder are listed separately.
|
|
162
|
-
|
|
163
|
-
The ledger is only ever created by the first apply — schema included, so the connection needs
|
|
164
|
-
permission to create it. Reading the status of a production connection never writes to it.
|
|
165
|
-
|
|
166
|
-
**Ledger table** in the header menu moves it to another schema. The setting covers every connection,
|
|
167
|
-
since dev and prod comparing ledgers in different places would mean nothing. A database that already
|
|
168
|
-
keeps its ledger somewhere else goes on using it rather than being stranded by the change, and the
|
|
169
|
-
status line says where. Schema names must be plain identifiers.
|
|
170
|
-
|
|
171
|
-
### Adopting a database that was migrated by hand
|
|
172
|
-
|
|
173
|
-
A database whose schema is already up to date has no ledger, so every migration reads as pending and
|
|
174
|
-
applying them would fail on tables that already exist. **Mark as already applied** — on one row from
|
|
175
|
-
its `⋯` menu, or on everything pending from the header menu — writes the ledger rows without running
|
|
176
|
-
any SQL, which is how you baseline an existing dev or prod. **Mark as not applied** takes a row back
|
|
177
|
-
out of the ledger, again without touching the schema. Both say plainly in the confirmation that
|
|
178
|
-
nothing will run.
|
|
179
|
-
|
|
180
|
-
**History** is both records at once, newest first. Each database's ledger says what it has applied,
|
|
181
|
-
when, and under which role — including runs made from someone else's machine, since that record lives
|
|
182
|
-
in the database rather than in a browser. This browser's own log adds what a ledger cannot keep:
|
|
183
|
-
reverts, failures with their error, and rows written without running anything. A run in both is one
|
|
184
|
-
event, not two. Every run is also appended to the [activity log](#activity-log).
|
|
185
|
-
|
|
186
|
-
A file that already wraps itself in a single `BEGIN` … `COMMIT` — how most migration folders are
|
|
187
|
-
written — needs no changes. YTDB takes that transaction over so its own ledger write joins it, and
|
|
188
|
-
says nothing about it. A `BEGIN` inside a PL/pgSQL function body is left alone, as it should be.
|
|
189
|
-
|
|
190
|
-
Migrations that PostgreSQL refuses to run inside a transaction — `CREATE INDEX CONCURRENTLY`, say —
|
|
191
|
-
opt out with a directive on the first line:
|
|
192
|
-
|
|
193
|
-
```sql
|
|
194
|
-
-- ytdb:no-transaction
|
|
195
|
-
CREATE INDEX CONCURRENTLY orders_placed_at_idx ON orders (placed_at);
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Those run unwrapped and are recorded straight after, so a failure partway through leaves work behind.
|
|
199
|
-
A file that commits more than once is treated the same way, since YTDB cannot join a transaction it
|
|
200
|
-
does not control. Both are labelled in the list and named in the confirmation before anything runs.
|
|
201
|
-
|
|
202
|
-
## Run YTDB
|
|
203
|
-
|
|
204
|
-
### Requirements
|
|
205
|
-
|
|
206
|
-
- Node.js 20.9 or newer
|
|
207
|
-
- npm
|
|
208
|
-
- A PostgreSQL database you can reach from your machine
|
|
209
|
-
|
|
210
|
-
Start YTDB without cloning the repository:
|
|
211
|
-
|
|
212
|
-
```bash
|
|
213
|
-
npx @theobourgeois/ytdb
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
Run that command outside a YTDB source checkout. Inside this repository, npm treats the local
|
|
217
|
-
package as already installed; use `npx --yes --package=@theobourgeois/ytdb@latest -- ytdb`
|
|
218
|
-
when you specifically want to test the published package from here.
|
|
219
|
-
|
|
220
|
-
The command starts an authenticated database bridge bound to `127.0.0.1` and opens
|
|
221
|
-
[ytdb.theobourgeois.com](https://ytdb.theobourgeois.com). Select **New**, then enter a
|
|
222
|
-
name and PostgreSQL connection URL:
|
|
223
|
-
|
|
224
|
-
```text
|
|
225
|
-
postgresql://user:password@host:5432/database
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
The hosted UI talks directly to that loopback-only bridge. The fragment in the URL contains
|
|
229
|
-
a random, per-process session token; URL fragments are not sent to the hosted server. Closing
|
|
230
|
-
the command stops database access and restarting it creates a new token.
|
|
231
|
-
|
|
232
|
-
To run the entire UI locally or work on YTDB itself:
|
|
233
|
-
|
|
234
|
-
```bash
|
|
235
|
-
git clone https://github.com/theobourgeois/YTDB.git
|
|
236
|
-
cd YTDB
|
|
237
|
-
npm install
|
|
238
|
-
npm run dev
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
Open [http://127.0.0.1:4371](http://127.0.0.1:4371). No environment variables or
|
|
242
|
-
administrator-level hostname setup are required. The Convex scaffold is optional and the UI
|
|
243
|
-
still runs when `NEXT_PUBLIC_CONVEX_URL` is unset.
|
|
244
|
-
|
|
245
|
-
## Activity log
|
|
246
|
-
|
|
247
|
-
Every action taken in YTDB is appended to a local JSONL log, so you can retrace what
|
|
248
|
-
happened while debugging, or mine the history later. Logs are written to
|
|
249
|
-
`.ytdb/activity/YYYY-MM-DD.jsonl` (one file per day, ignored by Git).
|
|
250
|
-
|
|
251
|
-
```bash
|
|
252
|
-
npm run log # last 50 actions
|
|
253
|
-
npm run log -- --follow # stream actions as they happen
|
|
254
|
-
npm run log -- --errors # only failures
|
|
255
|
-
npm run log -- --action query # only SQL console runs
|
|
256
|
-
npm run log -- --slow 500 # only actions taking 500ms or more
|
|
257
|
-
npm run log -- --limit all --json # the raw entries, for analysis
|
|
258
|
-
npm run log -- --help # all options
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
Each line is one self-describing JSON object:
|
|
262
|
-
|
|
263
|
-
```json
|
|
264
|
-
{
|
|
265
|
-
"v": 1,
|
|
266
|
-
"id": "914c2716-d586-4f1b-bae3-d3785969e252",
|
|
267
|
-
"ts": "2026-09-03T12:44:41.302Z",
|
|
268
|
-
"source": "api",
|
|
269
|
-
"action": "rows",
|
|
270
|
-
"connection": "postgres://appuser@127.0.0.1:5432/shopdb",
|
|
271
|
-
"status": "ok",
|
|
272
|
-
"durationMs": 5,
|
|
273
|
-
"params": { "query": { "table": { "schema": "public", "name": "widgets" } } },
|
|
274
|
-
"result": { "rows": 3, "columns": 3, "total": 3 }
|
|
275
|
-
}
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
- `action` is one of `tables`, `rows`, `query`, `cell.update`, `rows.insert`, `rows.delete`,
|
|
279
|
-
`related`, `lookup`, `definition`, `schema`, `ledger`, `migrate`, or a browser-only action
|
|
280
|
-
(`connection.add`, `connection.update`, `connection.remove`, `config.export`, `config.import`,
|
|
281
|
-
`migrations.import`, `migrations.remove`).
|
|
282
|
-
- `connection` keeps the user, host, and database so entries are attributable, but the
|
|
283
|
-
password is always stripped before anything is written.
|
|
284
|
-
- `params` records the request that was made; `result` records counts, never row data, so
|
|
285
|
-
the log never becomes a copy of your database.
|
|
286
|
-
- Payloads over 20 KB are stored as a truncated preview.
|
|
287
|
-
|
|
288
|
-
Set `YTDB_LOG=off` to disable logging, or `YTDB_LOG_DIR` to write elsewhere.
|
|
289
|
-
Logging is fire-and-forget: a failed write is reported once on the server console and never
|
|
290
|
-
fails the action it was recording.
|
|
291
|
-
|
|
292
|
-
## Useful commands
|
|
293
|
-
|
|
294
|
-
```bash
|
|
295
|
-
npm run dev # development server on 127.0.0.1:4371
|
|
296
|
-
npm run build # production build
|
|
297
|
-
npm start # serve the production build
|
|
298
|
-
npm run lint # ESLint
|
|
299
|
-
npm run log # local activity log
|
|
300
|
-
npm pack --dry-run # inspect the publishable npx package
|
|
301
|
-
npm run dev:convex # optional Convex development process
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
## Security model
|
|
305
|
-
|
|
306
|
-
The UI is hosted, but all PostgreSQL access is performed by the loopback-only process started
|
|
307
|
-
by `npx @theobourgeois/ytdb`.
|
|
308
|
-
|
|
309
|
-
- Connection URLs are stored in your browser's `localStorage` for the
|
|
310
|
-
`ytdb.theobourgeois.com` origin.
|
|
311
|
-
- SQL query drafts and history are also stored locally and are never sent to Convex.
|
|
312
|
-
- Each database request goes from the hosted UI to `127.0.0.1`, where the local bridge connects
|
|
313
|
-
to PostgreSQL. The Vercel deployment refuses all database API requests.
|
|
314
|
-
- The bridge accepts only the official UI origin and requests bearing its random session token.
|
|
315
|
-
- The hosted page has no analytics or third-party scripts, and its Content Security Policy
|
|
316
|
-
blocks scripts and network requests from unapproved origins.
|
|
317
|
-
- The query console runs one statement at a time inside a read-only transaction and returns at most 500 rows.
|
|
318
|
-
- The migration runner is not read-only: it runs whatever SQL the imported files contain, with the
|
|
319
|
-
privileges of the connection you run it from, and creates the `maintenance` schema and its
|
|
320
|
-
`ytdb_migrations` table on first use.
|
|
321
|
-
Imported migration files are held in your browser and never leave your machine.
|
|
322
|
-
- Exported YTDB configuration files include connection URLs. Treat those files like passwords and never commit them.
|
|
323
|
-
- The app supports writes, row insertion, and row deletion. Use a read-only or least-privilege PostgreSQL role when you do not need editing.
|
|
324
|
-
- The activity log records the SQL you run and the parameters you send. It stays on your
|
|
325
|
-
machine in `.ytdb/`, which Git ignores; treat it as sensitive and delete the directory
|
|
326
|
-
to clear the history.
|
|
327
|
-
- `.env*` files remain ignored by Git, with only the blank `.env.example` template allowed into the repository.
|
|
328
|
-
|
|
329
|
-
## Project structure
|
|
330
|
-
|
|
331
|
-
```text
|
|
332
|
-
src/
|
|
333
|
-
app/
|
|
334
|
-
api/ PostgreSQL route handlers
|
|
335
|
-
[connectionId]/ database explorer routes
|
|
336
|
-
components/
|
|
337
|
-
connections/ connection and config management
|
|
338
|
-
diff/ schema comparison between two connections
|
|
339
|
-
explorer/ schemas, tables, and navigation
|
|
340
|
-
migrations/ importing, running, and reverting migration folders
|
|
341
|
-
table/ grid, filters, editors, and pagination
|
|
342
|
-
lib/
|
|
343
|
-
activity/ local action log
|
|
344
|
-
db/ server-only PostgreSQL access
|
|
345
|
-
migrations/ folder parsing, ledger comparison, run plans
|
|
346
|
-
store/ persisted browser state
|
|
347
|
-
schema-diff.ts structural comparison of two snapshots
|
|
348
|
-
schema-migration.ts DDL that brings one database in line with another
|
|
349
|
-
hooks/ shared React hooks
|
|
350
|
-
scripts/ local activity-log reader
|
|
351
|
-
bin/ `npx @theobourgeois/ytdb` launcher
|
|
352
|
-
convex/ optional Convex scaffold
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
## Tech stack
|
|
356
|
-
|
|
357
|
-
[Next.js 16](https://nextjs.org/) · [React 19](https://react.dev/) · [PostgreSQL](https://www.postgresql.org/) · [Tailwind CSS 4](https://tailwindcss.com/) · [Base UI](https://base-ui.com/) · [Zustand](https://zustand.docs.pmnd.rs/) · [Convex](https://www.convex.dev/)
|
|
11
|
+

|
package/bin/ytdb.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
|
-
import { randomBytes } from "node:crypto";
|
|
5
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
5
|
import { homedir, platform } from "node:os";
|
|
7
6
|
import { dirname, join } from "node:path";
|
|
@@ -67,12 +66,11 @@ if (!existsSync(nextBin) || !existsSync(buildId)) {
|
|
|
67
66
|
process.exit(1);
|
|
68
67
|
}
|
|
69
68
|
|
|
70
|
-
const token = randomBytes(32).toString("base64url");
|
|
71
|
-
const fragment = `token=${encodeURIComponent(token)}&port=${port}`;
|
|
72
69
|
const localOrigin = `http://127.0.0.1:${port}`;
|
|
70
|
+
// The hosted UI remembers this port, so later visits to the bare origin find the bridge.
|
|
73
71
|
const browserUrl = process.argv.includes("--local")
|
|
74
|
-
? `${localOrigin}
|
|
75
|
-
: `${hostedOrigin}
|
|
72
|
+
? `${localOrigin}/`
|
|
73
|
+
: `${hostedOrigin}/#port=${port}`;
|
|
76
74
|
|
|
77
75
|
const child = spawn(
|
|
78
76
|
process.execPath,
|
|
@@ -84,7 +82,6 @@ const child = spawn(
|
|
|
84
82
|
NEXT_TELEMETRY_DISABLED: "1",
|
|
85
83
|
// The bridge trusts whichever origin this process actually opened.
|
|
86
84
|
YTDB_HOSTED_ORIGIN: hostedOrigin,
|
|
87
|
-
YTDB_BRIDGE_TOKEN: token,
|
|
88
85
|
YTDB_LOG_DIR: join(homedir(), ".ytdb", "activity"),
|
|
89
86
|
},
|
|
90
87
|
stdio: "inherit",
|
|
@@ -105,9 +102,7 @@ for (const signal of ["SIGINT", "SIGTERM"]) {
|
|
|
105
102
|
async function waitUntilReady() {
|
|
106
103
|
for (let attempt = 0; attempt < 100 && !stopped; attempt += 1) {
|
|
107
104
|
try {
|
|
108
|
-
const response = await fetch(`${localOrigin}/api/health
|
|
109
|
-
headers: { Authorization: `Bearer ${token}` },
|
|
110
|
-
});
|
|
105
|
+
const response = await fetch(`${localOrigin}/api/health`);
|
|
111
106
|
if (response.ok) return;
|
|
112
107
|
} catch {
|
|
113
108
|
// The server is still starting.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theobourgeois/ytdb",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A fast, local-first PostgreSQL browser.",
|
|
5
5
|
"homepage": "https://ytdb.theobourgeois.com",
|
|
6
6
|
"repository": {
|
|
@@ -46,9 +46,11 @@
|
|
|
46
46
|
"@codemirror/view": "^6.43.10",
|
|
47
47
|
"@lezer/highlight": "^1.2.3",
|
|
48
48
|
"@uiw/react-codemirror": "^4.25.11",
|
|
49
|
+
"@xyflow/react": "^12.12.0",
|
|
49
50
|
"class-variance-authority": "^0.7.1",
|
|
50
51
|
"clsx": "^2.1.1",
|
|
51
52
|
"convex": "^1.45.0",
|
|
53
|
+
"elkjs": "^0.12.0",
|
|
52
54
|
"next": "16.3.0",
|
|
53
55
|
"pg": "^8.23.0",
|
|
54
56
|
"react": "19.2.8",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{var a={};a.id=9820,a.ids=[9820],a.modules={3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5681:(a,b,c)=>{"use strict";c.d(b,{G3:()=>A,h5:()=>E,$U:()=>H,oK:()=>D,x4:()=>G,ex:()=>F});var d=c(48249);c(67484);var e=c(90038),f=c(61903),g=c(62379),h=c(89265),i=c(52899),j=c(48607),k=c(26447),l=c(1359),m=c(30250),n=c(35116),o=c(84412),p=c(14490),q=c(25297),r=c(21654),s=c(88877);function t({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,p.cn)("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",a),...b})}c(86871);let u=(0,r.F)("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function v({className:a,align:b="inline-start",...c}){return(0,d.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":b,className:(0,p.cn)(u({align:b}),a),onClick:a=>{a.target.closest("button")||a.currentTarget.parentElement?.querySelector("input")?.focus()},...c})}let w=(0,r.F)("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function x({className:a,type:b="button",variant:c="ghost",size:e="xs",...f}){return(0,d.jsx)(q.$,{type:b,"data-size":e,variant:c,className:(0,p.cn)(w({size:e}),a),...f})}function y({className:a,...b}){return(0,d.jsx)(s.p,{"data-slot":"input-group-control",className:(0,p.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",a),...b})}var z=c(23171);let A=e.i;function B({className:a,children:b,...c}){return(0,d.jsxs)(f.M,{"data-slot":"combobox-trigger",className:(0,p.cn)("[&_svg:not([class*='size-'])]:size-4",a),...c,children:[b,(0,d.jsx)(z.RQe,{className:"pointer-events-none size-4 text-muted-foreground"})]})}function C({className:a,...b}){return(0,d.jsx)(g.V,{"data-slot":"combobox-clear",render:(0,d.jsx)(x,{variant:"ghost",size:"icon-xs"}),className:(0,p.cn)(a),...b,children:(0,d.jsx)(z.yBK,{className:"pointer-events-none"})})}function D({className:a,children:b,disabled:c=!1,showTrigger:e=!0,showClear:f=!1,inputRef:g,...i}){return(0,d.jsxs)(t,{className:(0,p.cn)("w-auto",a),children:[(0,d.jsx)(h.o,{ref:g,render:(0,d.jsx)(y,{disabled:c}),...i}),(0,d.jsxs)(v,{align:"inline-end",children:[e&&(0,d.jsx)(x,{size:"icon-xs",variant:"ghost",render:(0,d.jsx)(B,{}),"data-slot":"input-group-button",className:"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",disabled:c}),f&&(0,d.jsx)(C,{disabled:c})]}),b]})}function E({className:a,side:b="bottom",sideOffset:c=6,align:e="start",alignOffset:f=0,anchor:g,...h}){return(0,d.jsx)(i.K,{children:(0,d.jsx)(j.o,{side:b,sideOffset:c,align:e,alignOffset:f,anchor:g,className:"isolate z-80",children:(0,d.jsx)(k.I,{"data-slot":"combobox-content","data-chips":!!g,className:(0,p.cn)("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",a),...h})})})}function F({className:a,...b}){return(0,d.jsx)(l.e,{"data-slot":"combobox-list",className:(0,p.cn)("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0",a),...b})}function G({className:a,children:b,...c}){return(0,d.jsxs)(m.x,{"data-slot":"combobox-item",className:(0,p.cn)("relative flex h-8 w-full cursor-pointer items-center gap-2 rounded-lg pr-8 pl-2 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),...c,children:[b,(0,d.jsx)(n.Q,{render:(0,d.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:(0,d.jsx)(z.wiW,{className:"pointer-events-none"})})]})}function H({className:a,...b}){return(0,d.jsx)(o.$,{"data-slot":"combobox-empty",className:(0,p.cn)("hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",a),...b})}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},24358:(a,b,c)=>{Promise.resolve().then(c.bind(c,99432))},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},38522:a=>{"use strict";a.exports=require("node:zlib")},38632:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(5735),e=c(99432);function f(){return(0,d.jsx)(e.MigrationsIndex,{})}},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70456:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>s,handler:()=>u,routeModule:()=>t});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,35780))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,1777))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),q={children:["",{children:["[connectionId]",{children:["migrations",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,38632))),"/Users/theobourgeois/code/db-studio/src/app/[connectionId]/migrations/page.tsx"]}]},{"global-error":[p,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"/Users/theobourgeois/code/db-studio/src/app/[connectionId]/layout.tsx"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a),async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,59645)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}},["_not-found","_global-error","api","favicon.ico","icon.svg"]]},{layout:[i,"/Users/theobourgeois/code/db-studio/src/app/layout.tsx"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a),async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,59645)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}},[]]}.children,r=(0,e.H)({tree:q,page:"/[connectionId]/migrations/page",pathname:"/[connectionId]/migrations",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),s=r.__next_app__,t=r.routeModule,u=r.handler},81040:(a,b,c)=>{"use strict";c.d(b,{MigrationsIndex:()=>P});var d=c(48249),e=c(2116),f=c.n(e),g=c(19099),h=c(67484),i=c(23171),j=c(30770),k=c(44231),l=c(86229),m=c(25297),n=c(82244),o=c(61903),p=c(89265),q=c(5681),r=c(53286),s=c(1814),t=c(20886),u=c(21883),v=c(453),w=c(78931),x=c(99598),y=c(66280),z=c(14490),A=c(60101),B=c(56918),C=c(65292),D=c(29613),E=c(76829),F=c(38393),G=c(78394);let H=[{verdict:"applied",title:"Already there",hint:"Everything these create or change is in the database.",preselected:!0},{verdict:"partial",title:"Partly there",hint:"Some of what these do is in the database and some is not — often a later migration changed it again.",preselected:!1},{verdict:"unknown",title:"Leaves no trace",hint:"Data changes, seeds, and grants cannot be seen in the schema. Include them if you know they ran.",preselected:!1},{verdict:"pending",title:"Not there",hint:"Nothing these do is in the database. Marking these hides work that still needs to run.",preselected:!1}];function I(a){return`${a.setName}\0${a.version}`}function J({connection:a,ledgerSchema:b,plan:c,onDone:e,onOpenChange:f}){let[g,k]=(0,h.useState)(null),[l,n]=(0,h.useState)(null),[o,p]=(0,h.useState)(new Set),[q,r]=(0,h.useState)([]),[s,t]=(0,h.useState)(!1),[v,w]=(0,h.useState)(null),[x,y]=(0,h.useState)(null),A=(0,h.useMemo)(()=>{if(!g)return[];let a=new Map(c.entries.map(a=>[I(a),a]));return H.map(b=>({verdict:b.verdict,title:b.title,hint:b.hint,entries:g.filter(a=>a.verdict===b.verdict).flatMap(b=>{let c=a.get(I(b));return c?[{entry:c,result:b}]:[]})})).filter(a=>a.entries.length>0)},[g,c.entries]),B=c.entries.filter(a=>o.has(I(a)));async function C(c){t(!0),y(null);try{w(await u.F.adopt(a.url,{ledgerSchema:b,entries:c})),e()}catch(a){y(a instanceof Error?a.message:String(a))}finally{t(!1)}}let D=!g&&!l;return(0,d.jsx)(F.lG,{open:!0,onOpenChange:a=>!s&&f(a),children:(0,d.jsxs)(F.Cf,{className:"sm:max-w-xl",children:[(0,d.jsxs)(F.c7,{children:[(0,d.jsx)(F.L3,{children:v?`Marked ${v.recorded} as applied`:D?`Checking ${a.name}…`:`Mark as already applied on ${a.name}`}),(0,d.jsx)(F.rr,{children:(0,d.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5",children:[(0,d.jsx)("span",{children:v?"Recorded on":"Records on"}),(0,d.jsx)(j.F,{connection:a}),(0,d.jsx)("span",{className:"font-medium text-foreground",children:a.name}),(0,d.jsx)("span",{className:"font-mono text-[11px]",children:(0,G.p)(a.url)})]})})]}),v?(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:v.existing>0?`${v.existing} were already in the ledger and were left as they were.`:"Every one of them was new to the ledger."}):D?(0,d.jsxs)("p",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,d.jsx)(i.gnh,{className:"size-3.5 animate-spin"}),"Reading the schema to see which of the ",c.entries.length," have already run…"]}):l?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"max-h-32 overflow-auto rounded-md border border-destructive/25 bg-destructive/5 px-3 py-2 font-mono text-[11px] whitespace-pre-wrap text-destructive",children:l}),(0,d.jsxs)("p",{className:"text-xs text-muted-foreground",children:["The check could not run. You can still mark all ",c.entries.length," as applied if you know the database already has these changes."]})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"max-h-80 overflow-y-auto rounded-md border",children:A.map(a=>{let b=a.entries.filter(({entry:a})=>o.has(I(a))).length,c=q.includes(a.verdict);return(0,d.jsxs)("div",{className:"border-b last:border-b-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2",children:[(0,d.jsx)("input",{type:"checkbox","aria-label":`Include ${a.title}`,className:"size-3.5 cursor-pointer accent-primary",checked:b===a.entries.length,ref:c=>{c&&(c.indeterminate=b>0&&b<a.entries.length)},onChange:b=>{var c;return c=b.target.checked,void p(b=>{let d=new Set(b);for(let{entry:b}of a.entries)c?d.add(I(b)):d.delete(I(b));return d})}}),(0,d.jsxs)("button",{type:"button","aria-expanded":c,onClick:()=>{var b;return b=a.verdict,void r(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2 text-left",children:[(0,d.jsx)(i.nNJ,{className:(0,z.cn)("size-3.5 shrink-0 text-muted-foreground/70 transition-transform",c&&"rotate-90")}),(0,d.jsx)("span",{className:"text-sm",children:a.title}),(0,d.jsxs)("span",{className:"tabular-nums text-xs text-muted-foreground",children:[b,"/",a.entries.length]})]}),(0,d.jsx)(K,{verdict:a.verdict})]}),!c&&(0,d.jsx)("p",{className:"px-9 pb-2 text-[11px] text-muted-foreground",children:a.hint}),c&&(0,d.jsxs)("div",{className:"bg-muted/25",children:[(0,d.jsx)("p",{className:"px-9 py-1.5 text-[11px] text-muted-foreground",children:a.hint}),a.entries.map(({entry:a,result:b})=>{let c=b.evidence.filter(a=>!a.satisfied),e=b.evidence.find(a=>a.note)?.note;return(0,d.jsxs)("label",{className:"flex cursor-pointer items-start gap-2 border-t px-3 py-1.5 text-xs hover:bg-muted/40",children:[(0,d.jsx)("input",{type:"checkbox",className:"mt-0.5 size-3.5 cursor-pointer accent-primary",checked:o.has(I(a)),onChange:()=>{p(b=>{let c=new Set(b),d=I(a);return c.has(d)?c.delete(d):c.add(d),c})}}),(0,d.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("span",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"shrink-0 text-muted-foreground",children:a.setName}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-muted-foreground",children:a.version}),(0,d.jsx)("span",{className:"min-w-0 truncate",children:a.name})]}),(c.length>0||e)&&(0,d.jsxs)("span",{className:"mt-0.5 block truncate text-[11px] text-muted-foreground",children:[c.length>0&&(0,d.jsxs)(d.Fragment,{children:["Missing: ",c.slice(0,2).map(a=>a.description).join(", "),c.length>2&&` and ${c.length-2} more`]}),c.length>0&&e&&" \xb7 ",e]})]})]},I(a))})]})]},a.verdict)})}),(0,d.jsxs)("p",{className:"rounded-md border border-amber-600/25 bg-amber-500/8 px-3 py-2 text-xs",children:[(0,d.jsx)("span",{className:"font-medium",children:"No SQL runs."})," Only the ledger on"," ",a.name," changes, in one transaction. Rows already there are not touched."]})]}),x&&(0,d.jsx)("p",{className:"max-h-32 overflow-auto rounded-md border border-destructive/25 bg-destructive/5 px-3 py-2 font-mono text-[11px] whitespace-pre-wrap text-destructive",children:x}),(0,d.jsx)(F.Es,{children:v?(0,d.jsx)(m.$,{onClick:()=>f(!1),children:"Close"}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(m.$,{variant:"outline",disabled:s,onClick:()=>f(!1),children:"Cancel"}),l?(0,d.jsx)(m.$,{disabled:s,onClick:()=>void C(c.entries),children:s?"Marking…":`Mark all ${c.entries.length} as applied`}):(0,d.jsx)(m.$,{disabled:s||D||0===B.length,onClick:()=>void C(B),children:s?"Marking…":`Mark as applied (${B.length})`})]})})]})})}function K({verdict:a}){return"applied"===a?(0,d.jsx)(i.wiW,{className:"size-4 shrink-0 text-emerald-600 dark:text-emerald-400"}):"partial"===a?(0,d.jsx)(i.e5t,{className:"size-3.5 shrink-0 text-amber-600 dark:text-amber-400"}):"pending"===a?(0,d.jsx)(i.e5t,{className:"size-3.5 shrink-0 text-destructive"}):(0,d.jsx)("span",{className:"size-1.5 shrink-0 rounded-full bg-muted-foreground/40"})}var L=c(88877),M=c(90863);function N({root:a,environmentNames:b,onOpenChange:c,onSave:e}){let[f,g]=(0,h.useState)(a??""),i=f.trim(),j=i.startsWith("/")||i.startsWith("~")||/^[A-Za-z]:[\\/]/.test(i);function k(){i&&j&&(e(i),c(!1))}return(0,d.jsx)(F.lG,{open:!0,onOpenChange:c,children:(0,d.jsxs)(F.Cf,{className:"sm:max-w-lg",children:[(0,d.jsxs)(F.c7,{children:[(0,d.jsx)(F.L3,{children:"Migrations folder"}),(0,d.jsxs)(F.rr,{children:["A folder on this computer. Each folder inside it that holds .sql files is one migration, read fresh from disk every time — whatever branch is checked out is what shows. ",b.join(", ")," will all read from it."]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)(M.J,{htmlFor:"repo-root",children:"Path"}),(0,d.jsx)(L.p,{id:"repo-root",value:f,placeholder:"~/code/app/src/lib/supabase/migrations",spellCheck:!1,autoComplete:"off",autoFocus:!0,"aria-invalid":i.length>0&&!j,onChange:a=>g(a.target.value),onKeyDown:a=>"Enter"===a.key&&k()}),i.length>0&&!j&&(0,d.jsx)("p",{className:"text-xs text-destructive",children:"An absolute path, or one starting with ~."})]}),(0,d.jsxs)(F.Es,{children:[a&&(0,d.jsx)(m.$,{variant:"ghost",className:"mr-auto",onClick:function(){e(null),c(!1)},children:"Stop reading from disk"}),(0,d.jsx)(m.$,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),(0,d.jsx)(m.$,{disabled:!i||!j,onClick:k,children:"Save"})]})]})})}var O=c(30904);function P(){let a=(0,g.useRouter)(),{connection:b}=(0,k.k)(),c=(0,y.jV)(a=>a.sets),e=(0,y.jV)(a=>a.createSet),f=(0,y.jV)(a=>a.adoptSet),j=(0,y.jV)(a=>a.addFiles),o=(0,y.jV)(a=>a.removeSet),p=(0,y.jV)(a=>a.ledgerSchema),q=(0,y.jV)(a=>a.history),s=(0,x.gz)(b.id),[F,G]=(0,h.useState)("migrations"),[H,I]=(0,h.useState)(null),[K,L]=(0,h.useState)(null),[M,P]=(0,h.useState)(!1),[Q,V]=(0,h.useState)(!1),[W,X]=(0,h.useState)(null),Y=(0,h.useMemo)(()=>[b,...s],[b,s]),Z=Y.map(a=>a.url).join("|"),{scope:$,root:_,checkout:aa}=(0,y.ox)(b.id),ab=(0,y.jV)(a=>a.setRepoRoot),ac=(0,y.jV)(a=>a.setRepoCheckout),ad=(0,y.ec)(),ae=(0,y.kG)($),af=(0,y.jV)(a=>a.setListFilter),ag=(0,O.y)(_,aa),ah=(0,h.useMemo)(()=>[...ag.data?.sets??[]].sort((a,b)=>b.importedAt-a.importedAt),[ag.data]),ai=(0,t.Y)(`ledgers:${p}:${Z}`,async a=>Object.fromEntries(await Promise.all(Y.map(async b=>{try{return[b.id,{ledger:await u.F.ledger(b.url,p,a),error:null}]}catch(c){if(a.aborted)throw c;return[b.id,{ledger:null,error:c instanceof Error?c.message:String(c)}]}})))),aj=(0,h.useCallback)((a,b)=>[...ah,...c].find(b=>b.name===a)?.steps.find(a=>a.version===b)??null,[ah,c]),ak=(0,h.useMemo)(()=>(0,v.x)(Y.map(a=>({connection:a,ledger:ai.data?.[a.id]?.ledger??null})),q),[Y,ai.data,q]),al=`/${encodeURIComponent(b.id)}/migrations`,am=(0,h.useCallback)(b=>{let c=e(b.name);j(c,b.files),a.push(`${al}/${encodeURIComponent(c)}`)},[e,j,a,al]);async function an(b){I(b),L(null);try{let c=await Promise.all(Y.map(async a=>{try{return{read:await u.F.ledger(a.url,p,void 0,!0),error:null}}catch(a){return{read:null,error:a instanceof Error?a.message:String(a)}}})),d=c.find(a=>a.error);if(d?.error)return void L(d.error);let e=c.some(a=>a.read&&void 0===a.read.withSql),g=new Map;for(let{read:a}of c)for(let c of a?.entries??[]){if(c.setName.trim()!==b)continue;let a=g.get(c.version);a?.applySql||g.set(c.version,c)}let{set:h,missing:i}=(0,B.wQ)(b,[...g.values()]);if(0===h.steps.length)return void L(e?"The YTDB running on your machine is older than this page and cannot send stored SQL. Restart it with `npx @theobourgeois/ytdb@latest`.":`${b} was applied before YTDB stored SQL, so it cannot be rebuilt. Drop its folder instead.`);f(h),i.length>0&&L(`Rebuilt ${h.steps.length} of ${h.steps.length+i.length}. No SQL was stored for ${i.join(", ")}.`),a.push(`${al}/${encodeURIComponent(h.id)}`)}catch(a){L(a instanceof Error?a.message:String(a))}finally{I(null)}}let ao=(0,h.useMemo)(()=>[...c].sort((a,b)=>b.importedAt-a.importedAt),[c]),ap=(0,h.useMemo)(()=>(0,w.lF)(Y.map(a=>({connection:a,ledger:ai.data?.[a.id]?.ledger??null})),[...ah,...c].map(a=>a.name)),[Y,ai.data,ah,c]),aq=(0,h.useMemo)(()=>{let a=ai.data?.[b.id]?.ledger??null,c=[],d=0;if(!a)return{sets:0,entries:c};for(let b of ah){let e=(0,w.gj)(b,(0,w.Gf)(a,b.name));if(0!==e.steps.length)for(let a of(d+=1,e.steps))c.push({setName:b.name,version:a.version,name:a.name,checksum:a.checksum,applySql:a.applySql,revertSql:a.revertSql})}return{sets:d,entries:c}},[ai.data,b.id,ah]),ar=ai.loading||ag.loading,as=0===ah.length&&0===c.length&&0===ap.length,at=(0,h.useCallback)(a=>Y.map(b=>({connection:b,summary:(0,w.eh)(a,ai.data?.[b.id]?.ledger??null),read:!!ai.data?.[b.id]?.ledger,error:ai.data?.[b.id]?.error??null})),[Y,ai.data]),au=(0,h.useCallback)(a=>(0,w.yy)(a,at(a).map(a=>({connectionId:a.connection.id,summary:a.summary,read:a.read})),ae),[at,ae]),av=(0,h.useMemo)(()=>ah.filter(au),[ah,au]),aw=(0,h.useMemo)(()=>ao.filter(au),[ao,au]),ax=""!==ae.query.trim()||"all"!==ae.status,ay="all"!==ae.status&&void 0===ai.data,az=ay?0:ah.length+ao.length-av.length-aw.length;return(0,d.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,d.jsxs)(l.X,{children:[(0,d.jsx)(i.olY,{className:"size-4 shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"font-medium",children:"Migrations"}),_&&(0,d.jsx)(S,{root:ag.data?.root??_,git:ag.data?.git??null,checkouts:ag.data?.checkouts??[],checkout:ag.data?.checkout??null,onEdit:()=>V(!0),onPick:a=>ac($,a)}),(0,d.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[(0,d.jsx)(m.$,{size:"icon-sm",variant:"ghost",disabled:ar,"aria-label":"Refresh",title:_?"Re-read the folder and every environment's ledger":"Re-read every environment's ledger",onClick:function(){ai.reload(),ag.reload()},children:(0,d.jsx)(i.oS8,{className:(0,z.cn)(ar&&"animate-spin")})}),!_&&(0,d.jsxs)(m.$,{size:"sm",variant:"ghost",onClick:()=>V(!0),children:[(0,d.jsx)(i.WzY,{"data-icon":"inline-start"}),"Read from a folder"]}),(0,d.jsxs)(m.$,{size:"sm",variant:"ghost",onClick:()=>P(!0),children:[(0,d.jsx)(i.enO,{"data-icon":"inline-start"}),"New migration"]}),(_||c.length>0)&&(0,d.jsxs)(n.rI,{children:[(0,d.jsx)(n.ty,{render:(0,d.jsx)(m.$,{size:"icon-sm",variant:"ghost","aria-label":"More migration actions"}),className:"cursor-pointer",children:(0,d.jsx)(i.YKd,{})}),(0,d.jsxs)(n.SQ,{align:"end",className:"min-w-72",children:[_&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(n._2,{disabled:ar||0===aq.entries.length,onClick:()=>X(aq),children:[(0,d.jsx)(i.nXx,{}),"Mark everything as applied on ",b.name,(0,d.jsx)("span",{className:"ml-auto pl-3 font-mono text-[11px] text-muted-foreground",children:aq.entries.length})]}),(0,d.jsx)(n.mB,{}),(0,d.jsxs)(n._2,{onClick:()=>V(!0),children:[(0,d.jsx)(i.WzY,{}),"Change folder…"]})]}),c.length>0&&(0,d.jsxs)(d.Fragment,{children:[_&&(0,d.jsx)(n.mB,{}),(0,d.jsxs)(n._2,{variant:"destructive",onClick:function(){for(let a of c)o(a.id)},children:["Forget ",c.length," imported migration",1===c.length?"":"s"]})]})]})]})]})]}),ag.error&&(0,d.jsxs)("p",{className:"flex items-start gap-2 border-b bg-destructive/5 px-4 py-1.5 text-xs text-destructive",children:[(0,d.jsx)(i.e5t,{className:"mt-px size-3.5 shrink-0"}),(0,d.jsx)("span",{className:"min-w-0 flex-1",children:ag.error}),(0,d.jsx)(m.$,{size:"xs",variant:"ghost",onClick:()=>V(!0),children:"Change folder"})]}),"history"===F?(0,d.jsx)(r.F,{className:"min-h-0 flex-1",children:(0,d.jsx)(A.H,{events:ak,connections:Y,loading:ai.loading,ledgerSchema:p,findStep:aj,onLedgerChange:ai.reload})}):ad?as&&_&&ag.loading?(0,d.jsxs)("p",{className:"px-4 py-6 text-sm text-muted-foreground",children:["Reading ",_,"…"]}):as&&_?(0,d.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-6 text-center",children:[(0,d.jsxs)("p",{className:"text-sm",children:["Nothing in ",_," yet."]}),(0,d.jsx)("p",{className:"max-w-md text-xs text-muted-foreground",children:"Each folder inside it that holds .sql files becomes a migration here, the moment it exists on the branch you have checked out."})]}):as?(0,d.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-4 p-6",children:[(0,d.jsx)(C.k,{onFiles:am,className:"w-full max-w-xl"}),(0,d.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Or"," ",(0,d.jsx)("button",{type:"button",className:"cursor-pointer underline underline-offset-4 hover:text-foreground",onClick:()=>V(!0),children:"read straight from a folder on this computer"}),", so nothing has to be imported."]})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(R,{filter:ae,environments:Y,hidden:az,onChange:a=>af($,a)}),(0,d.jsx)(r.F,{className:"min-h-0 flex-1",children:ay?(0,d.jsx)("p",{className:"px-4 py-6 text-sm text-muted-foreground",children:"Reading ledgers…"}):(0,d.jsxs)(d.Fragment,{children:[av.map(a=>(0,d.jsx)(T,{set:a,href:`${al}/${encodeURIComponent(a.id)}`,environments:at(a)},a.id)),aw.length>0&&_&&(0,d.jsx)("p",{className:"border-b px-4 pt-2.5 pb-1 text-[11px] font-medium tracking-wide text-muted-foreground uppercase",title:"Imported into this browser rather than read from the folder.",children:"Imported"}),aw.map(a=>(0,d.jsx)(T,{set:a,href:`${al}/${encodeURIComponent(a.id)}`,environments:at(a)},a.id)),ax&&0===av.length&&0===aw.length&&(0,d.jsxs)("p",{className:"px-4 py-6 text-sm text-muted-foreground",children:["Nothing matches."," ",(0,d.jsx)("button",{type:"button",className:"cursor-pointer underline underline-offset-4 hover:text-foreground",onClick:()=>af($,{query:"",status:"all"}),children:"Clear the filter"})]}),ap.length>0&&(0,d.jsxs)("div",{className:"border-b bg-muted/20",children:[(0,d.jsx)("p",{className:"px-4 pt-2.5 pb-1 text-[11px] font-medium tracking-wide text-muted-foreground uppercase",title:"Applied to a database from elsewhere. The SQL is kept in its ledger, so it opens without the folder.",children:"In the ledger only"}),ap.map(a=>(0,d.jsx)(U,{migration:a,busy:H===a.name,onOpen:()=>void an(a.name)},a.name)),K&&(0,d.jsx)("p",{className:"px-4 pt-1 pb-2 text-xs text-destructive",children:K})]}),!_&&(0,d.jsx)("div",{className:"p-4",children:(0,d.jsx)(C.k,{onFiles:am,compact:!0,className:"w-full"})})]})})]}):(0,d.jsx)("div",{className:"min-h-0 flex-1"}),(0,d.jsx)(E.l,{caption:function(a,b,c,d){if(d&&0===a)return"Reading folder…";if(0===a&&0===b&&0===c)return"No migrations yet";let e=[];return a>0&&e.push(`${a} migration${1===a?"":"s"} on disk`),b>0&&e.push(`${b} imported`),c>0&&e.push(`${c} in the ledger only`),e.join(" \xb7 ")}(ah.length,c.length,ap.length,null!==_&&ag.loading),pane:F,onPaneChange:G,historyCount:ak.length}),Q&&(0,d.jsx)(N,{root:_,environmentNames:Y.map(a=>a.name),onOpenChange:V,onSave:a=>ab($,a)}),W&&(0,d.jsx)(J,{connection:b,ledgerSchema:p,plan:W,onDone:()=>ai.reload(),onOpenChange:a=>!a&&X(null)}),(0,d.jsx)(D.K,{open:M,title:"New migration",submitLabel:"Create",onOpenChange:P,onSubmit:function(b){let c=e(b);a.push(`${al}/${encodeURIComponent(c)}`)}})]})}let Q={all:"All",pending:"Not fully applied",untouched:"Not started anywhere",complete:"Applied everywhere"};function R({filter:a,environments:b,hidden:c,onChange:e}){let f="all"!==a.status;return(0,d.jsxs)("div",{className:"flex items-center gap-1 border-b px-2 py-1",children:[(0,d.jsx)(s.L,{value:a.query,onChange:a=>e({query:a.target.value}),placeholder:"Search migrations","aria-label":"Search migrations",className:"min-w-0 flex-1",trailing:a.query?(0,d.jsx)("button",{type:"button","aria-label":"Clear search",className:"cursor-pointer rounded p-0.5 hover:text-foreground",onClick:()=>e({query:""}),children:(0,d.jsx)(i.yBK,{className:"size-3.5"})}):null}),(0,d.jsxs)(n.rI,{children:[(0,d.jsxs)(n.ty,{render:(0,d.jsx)(m.$,{size:"sm",variant:f?"outline":"ghost"}),className:"cursor-pointer",children:[function(a,b){if(a.startsWith("pending:")){let c=b.find(b=>b.id===a.slice(8));return c?`Pending on ${c.name}`:Q.pending}return Q[a]}(a.status,b),(0,d.jsx)(i.RQe,{"data-icon":"inline-end"})]}),(0,d.jsx)(n.SQ,{align:"end",className:"min-w-56",children:(0,d.jsxs)(n.Hr,{value:a.status,onValueChange:a=>e({status:a}),children:[Object.keys(Q).map(a=>(0,d.jsx)(n.Ht,{value:a,children:Q[a]},a)),b.length>1&&(0,d.jsx)(n.mB,{}),b.length>1&&b.map(a=>(0,d.jsxs)(n.Ht,{value:`pending:${a.id}`,children:[(0,d.jsx)(j.F,{connection:a,className:"size-1.5"}),"Pending on ",a.name]},a.id))]})})]}),c>0&&(0,d.jsxs)("span",{className:"shrink-0 pr-1 text-[11px] tabular-nums text-muted-foreground",children:[c," hidden"]})]})}function S({root:a,git:b,checkouts:c,checkout:e,onEdit:f,onPick:g}){var j;let k,[l,m]=(0,h.useState)(""),n=(0,h.useMemo)(()=>{let a=l.trim().toLowerCase();return a?c.filter(b=>b.branch.toLowerCase().includes(a)||b.path.toLowerCase().includes(a)):c},[c,l]),r="cursor-pointer rounded-md outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/60",s=b&&(0,d.jsxs)("span",{className:"shrink-0 rounded border px-1.5 font-mono text-[10px]",children:[b.branch,b.dirty&&"*"]});return(0,d.jsxs)("div",{className:"flex min-w-0 items-center text-xs text-muted-foreground",children:[(0,d.jsxs)("button",{type:"button",title:`Reading from ${a}. Click to change.`,onClick:f,className:(0,z.cn)("flex min-w-0 items-center gap-1.5 px-1.5 py-0.5",r),children:[(0,d.jsx)(i.WzY,{className:"size-3.5 shrink-0"}),(0,d.jsx)("span",{className:"max-w-64 truncate font-mono text-[11px]",children:(k=(j=a).split(/[\/]/).filter(Boolean)).length>2?`…/${k.slice(-2).join("/")}`:j})]}),b&&c.length>1?(0,d.jsxs)(q.G3,{items:n,filter:null,value:c.find(a=>a.path===e)??null,inputValue:l,onInputValueChange:a=>m(a),onOpenChange:a=>a&&m(""),itemToStringLabel:a=>a.branch,isItemEqualToValue:(a,b)=>a.path===b.path,onValueChange:a=>a&&g(a.path),children:[(0,d.jsxs)(o.M,{title:`${b.branch} (${b.commit}${b.dirty?", uncommitted changes":""}). Read from another worktree.`,className:(0,z.cn)("flex shrink-0 items-center gap-0.5 px-1 py-0.5",r),children:[s,(0,d.jsx)(i.klM,{className:"size-3"})]}),(0,d.jsxs)(q.h5,{className:"w-max min-w-56",children:[(0,d.jsxs)("div",{className:"m-1 mb-0 flex h-8 items-center gap-1.5 rounded-lg px-2 text-muted-foreground focus-within:bg-muted/60",children:[(0,d.jsx)(i.TfF,{className:"size-3.5 shrink-0"}),(0,d.jsx)(p.o,{placeholder:"Search worktrees",spellCheck:!1,autoComplete:"off",className:"h-full min-w-0 flex-1 bg-transparent text-[0.8rem] text-foreground outline-none placeholder:text-muted-foreground"})]}),(0,d.jsx)(q.$U,{children:"No matching worktrees"}),(0,d.jsx)(q.ex,{children:a=>(0,d.jsx)(q.x4,{value:a,title:a.path,children:(0,d.jsx)("span",{className:"font-mono text-xs",children:a.branch})},a.path)})]})]}):b&&(0,d.jsx)("span",{className:"px-1",title:`${b.branch} (${b.commit}${b.dirty?", uncommitted changes":""})`,children:s})]})}function T({set:a,href:b,environments:c}){return(0,d.jsxs)(f(),{href:b,className:"flex items-center gap-3 border-b px-4 py-3 outline-none transition-colors hover:bg-muted/40 focus-visible:bg-muted/40",children:[(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("p",{className:"flex min-w-0 items-center gap-1.5 text-sm font-medium",children:[(0,d.jsx)("span",{className:"truncate",children:a.name}),a.note&&(0,d.jsx)("span",{title:a.note,className:"shrink-0 text-muted-foreground",children:(0,d.jsx)(i.UA_,{className:"size-3.5"})})]}),(0,d.jsxs)("p",{className:"truncate text-xs text-muted-foreground",children:[0===a.steps.length?"No files yet":`${a.steps.length} migration${1===a.steps.length?"":"s"}`,a.steps.length>0&&` \xb7 ${a.steps[0].version}–${a.steps.at(-1)?.version}`,a.skipped.length>0&&` \xb7 ${a.skipped.length} skipped`]})]}),(0,d.jsx)("div",{className:"flex shrink-0 items-center gap-1.5",children:c.map(a=>(0,d.jsx)(V,{environment:a},a.connection.id))}),(0,d.jsx)(i.nNJ,{className:"size-4 shrink-0 text-muted-foreground/60"})]})}function U({migration:a,busy:b,onOpen:c}){return(0,d.jsxs)("div",{className:"flex items-center gap-3 border-t px-4 py-2.5 first:border-t-0",children:[(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsx)("p",{className:"truncate text-sm",children:a.name}),(0,d.jsxs)("p",{className:"truncate text-xs text-muted-foreground",children:[a.total," migration",1===a.total?"":"s",a.versions.length>0&&` \xb7 ${a.versions[0]}–${a.versions.at(-1)}`]})]}),(0,d.jsx)("div",{className:"flex shrink-0 items-center gap-1.5",children:a.applied.map(b=>(0,d.jsxs)("span",{className:"flex h-6 items-center gap-1.5 rounded-lg border border-dashed px-2 text-[11px] text-muted-foreground",children:[(0,d.jsx)("span",{className:"max-w-24 truncate",children:b.connectionName}),(0,d.jsxs)("span",{className:"tabular-nums",children:[b.count,"/",a.total]})]},b.connectionId))}),(0,d.jsx)(m.$,{size:"xs",variant:"outline",disabled:b,onClick:c,children:b?"Opening…":"Open"})]})}function V({environment:a}){let{connection:b,summary:c,read:e,error:f}=a,g=e&&c.total>0&&0===c.pending&&0===c.drifted,h=e&&0===c.applied&&0===c.drifted;return(0,d.jsxs)("span",{title:f?`${b.name}: ${f}`:e?`${b.name}: ${c.applied} of ${c.total} applied`:`${b.name}: reading…`,className:(0,z.cn)("flex h-6 items-center gap-1.5 rounded-lg border px-2 text-[11px]",f&&"border-destructive/30 text-destructive",g&&"border-emerald-600/30 bg-emerald-500/10",!f&&!g&&!h&&"border-amber-600/30 bg-amber-500/10",h&&"text-muted-foreground"),children:[(0,d.jsx)(j.F,{connection:b,className:"size-1.5"}),(0,d.jsx)("span",{className:"max-w-24 truncate",children:b.name}),(0,d.jsx)("span",{className:"tabular-nums",children:f?"—":e?`${c.applied}/${c.total}`:"…"})]})}},94094:(a,b,c)=>{Promise.resolve().then(c.bind(c,81040))},99432:(a,b,c)=>{"use strict";c.d(b,{MigrationsIndex:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call MigrationsIndex() from the server but MigrationsIndex is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/theobourgeois/code/db-studio/src/components/migrations/migrations-index.tsx","MigrationsIndex")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,2430,7928,8842,8202,7875,1421,7593,6729,5816],()=>b(b.s=70456));module.exports=c})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../../node_modules/next/dist/client/lib/console.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../../node_modules/next/dist/compiled/ws/index.js","../../../../../node_modules/next/dist/compiled/ws/package.json","../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../node_modules/next/dist/lib/constants.js","../../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../node_modules/next/dist/lib/is-error.js","../../../../../node_modules/next/dist/lib/picocolors.js","../../../../../node_modules/next/dist/lib/scheduler.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/blocking-route-messages.js","../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-tracking.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../../node_modules/next/dist/server/app-render/sync-io-messages.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../../node_modules/next/dist/server/node-environment.js","../../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../../node_modules/next/dist/server/require-hook.js","../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../node_modules/next/dist/shared/lib/instant-messages.js","../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1421.js","../../../chunks/2430.js","../../../chunks/4741.js","../../../chunks/5816.js","../../../chunks/6729.js","../../../chunks/7593.js","../../../chunks/7875.js","../../../chunks/7928.js","../../../chunks/8202.js","../../../chunks/8842.js","../../../webpack-runtime.js","page_client-reference-manifest.js"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/[connectionId]/migrations/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"6044":{"*":{"id":"70344","name":"*","chunks":[],"async":false}},"21890":{"*":{"id":"41390","name":"*","chunks":[],"async":false}},"23042":{"*":{"id":"86104","name":"*","chunks":[],"async":false}},"27123":{"*":{"id":"81921","name":"*","chunks":[],"async":false}},"37875":{"*":{"id":"53371","name":"*","chunks":[],"async":false}},"48491":{"*":{"id":"8419","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"35421","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"60440","name":"*","chunks":[],"async":false}},"61929":{"*":{"id":"77645","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"82265","name":"*","chunks":[],"async":false}},"65377":{"*":{"id":"19047","name":"*","chunks":[],"async":false}},"65450":{"*":{"id":"6135","name":"*","chunks":[],"async":false}},"69063":{"*":{"id":"81040","name":"*","chunks":[],"async":false}},"72737":{"*":{"id":"4833","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"61335","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"84342","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"74661","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"70664","name":"*","chunks":[],"async":false}},"94821":{"*":{"id":"80189","name":"*","chunks":[],"async":false}},"96365":{"*":{"id":"61314","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"sans\"}":{"id":34244,"name":"*","chunks":["223","static/chunks/223-a4fca67d979d899d.js","7177","static/chunks/app/layout-e3fdecae5544dc60.js"],"async":false},"/Users/theobourgeois/code/db-studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"mono\"}":{"id":64939,"name":"*","chunks":["223","static/chunks/223-a4fca67d979d899d.js","7177","static/chunks/app/layout-e3fdecae5544dc60.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/app/globals.css":{"id":51743,"name":"*","chunks":["223","static/chunks/223-a4fca67d979d899d.js","7177","static/chunks/app/layout-e3fdecae5544dc60.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/ConvexClientProvider.tsx":{"id":94821,"name":"*","chunks":["223","static/chunks/223-a4fca67d979d899d.js","7177","static/chunks/app/layout-e3fdecae5544dc60.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/local-bridge-gate.tsx":{"id":65377,"name":"*","chunks":["223","static/chunks/223-a4fca67d979d899d.js","7177","static/chunks/app/layout-e3fdecae5544dc60.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/navigation-tracker.tsx":{"id":48491,"name":"*","chunks":["223","static/chunks/223-a4fca67d979d899d.js","7177","static/chunks/app/layout-e3fdecae5544dc60.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/theme-provider.tsx":{"id":72737,"name":"*","chunks":["223","static/chunks/223-a4fca67d979d899d.js","7177","static/chunks/app/layout-e3fdecae5544dc60.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/app/page.tsx":{"id":23042,"name":"*","chunks":["4506","static/chunks/f97e080b-58fc9570cf11a0c7.js","1731","static/chunks/1731-6dec4b981289174f.js","8026","static/chunks/8026-d0db1e7b45d32046.js","2435","static/chunks/2435-240bc4349cace375.js","8361","static/chunks/8361-d0f8ce41b74637bf.js","7709","static/chunks/7709-b2eee040599bab79.js","6782","static/chunks/6782-c8b44f7f0d19d8e4.js","8974","static/chunks/app/page-957b7639b047ba08.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/explorer/explorer-shell.tsx":{"id":37875,"name":"*","chunks":["4506","static/chunks/f97e080b-58fc9570cf11a0c7.js","1731","static/chunks/1731-6dec4b981289174f.js","8026","static/chunks/8026-d0db1e7b45d32046.js","2435","static/chunks/2435-240bc4349cace375.js","8361","static/chunks/8361-d0f8ce41b74637bf.js","8322","static/chunks/8322-ed3deecf058cc11c.js","1981","static/chunks/1981-806ce42b1641772f.js","9243","static/chunks/9243-585cdd3c297cf117.js","7709","static/chunks/7709-b2eee040599bab79.js","6782","static/chunks/6782-c8b44f7f0d19d8e4.js","7123","static/chunks/app/%5BconnectionId%5D/layout-06d736d4773bd4a8.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/table/table-view.tsx":{"id":61929,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/diff/schema-diff-view.tsx":{"id":6044,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/migrations/migration-detail.tsx":{"id":65450,"name":"*","chunks":[],"async":false},"/Users/theobourgeois/code/db-studio/src/components/migrations/migrations-index.tsx":{"id":69063,"name":"*","chunks":["4506","static/chunks/f97e080b-58fc9570cf11a0c7.js","1731","static/chunks/1731-6dec4b981289174f.js","8026","static/chunks/8026-d0db1e7b45d32046.js","2435","static/chunks/2435-240bc4349cace375.js","8361","static/chunks/8361-d0f8ce41b74637bf.js","8322","static/chunks/8322-ed3deecf058cc11c.js","3960","static/chunks/3960-1b1a9a0ae3f12118.js","1981","static/chunks/1981-806ce42b1641772f.js","9243","static/chunks/9243-585cdd3c297cf117.js","7709","static/chunks/7709-b2eee040599bab79.js","1520","static/chunks/1520-1d9fc8b9ea29f3aa.js","9532","static/chunks/9532-860dc97ac3c3ff31.js","9820","static/chunks/app/%5BconnectionId%5D/migrations/page-fc5dcf1404df5c65.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/explorer/connection-home.tsx":{"id":21890,"name":"*","chunks":["1731","static/chunks/1731-6dec4b981289174f.js","1981","static/chunks/1981-806ce42b1641772f.js","2336","static/chunks/app/%5BconnectionId%5D/page-8f68a2646e2f3eaa.js"],"async":false},"/Users/theobourgeois/code/db-studio/src/components/query/query-view.tsx":{"id":96365,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/theobourgeois/code/db-studio/src/":[],"/Users/theobourgeois/code/db-studio/src/app/layout":[{"inlined":false,"path":"static/css/e02ab5db9ff2dca2.css"},{"inlined":false,"path":"static/css/ab9c0ea2c2569929.css"}],"/Users/theobourgeois/code/db-studio/src/app/page":[],"/Users/theobourgeois/code/db-studio/src/app/[connectionId]/layout":[],"/Users/theobourgeois/code/db-studio/src/app/[connectionId]/page":[],"/Users/theobourgeois/code/db-studio/src/app/[connectionId]/migrations/page":[]},"rscModuleMapping":{"6044":{"*":{"id":"58977","name":"*","chunks":[],"async":false}},"21890":{"*":{"id":"52468","name":"*","chunks":[],"async":false}},"23042":{"*":{"id":"4494","name":"*","chunks":[],"async":false}},"27123":{"*":{"id":"95547","name":"*","chunks":[],"async":false}},"37875":{"*":{"id":"34766","name":"*","chunks":[],"async":false}},"48491":{"*":{"id":"19933","name":"*","chunks":[],"async":false}},"51743":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"98099","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"15098","name":"*","chunks":[],"async":false}},"61929":{"*":{"id":"12377","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"33859","name":"*","chunks":[],"async":false}},"65377":{"*":{"id":"17569","name":"*","chunks":[],"async":false}},"65450":{"*":{"id":"97182","name":"*","chunks":[],"async":false}},"69063":{"*":{"id":"99432","name":"*","chunks":[],"async":false}},"72737":{"*":{"id":"65223","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"16237","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"47644","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"36675","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"98562","name":"*","chunks":[],"async":false}},"94821":{"*":{"id":"88331","name":"*","chunks":[],"async":false}},"96365":{"*":{"id":"2781","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}};
|