Repository navigation
Conversation
The DatabasePlugin is no longer hidden from `databricks apps init`. The template ships config/database/schema.ts in the app schema and a README section on the development workflow, and the plugin docs describe the flow end to end: `appkit db init` for a branch of your own, `appkit db migrate` while you develop, migrations applied by the deployed app on start, `appkit db verify` to check both sides, and one owner per branch. The template lists drizzle-kit as a dev dependency, since `appkit db init` and `appkit db migrate` generate migrations with it; check-template-deps keeps it at the version AppKit pins. Every scaffolded app gets it, with or without the plugin: `apps init` installs from the template's one committed lockfile with npm ci / pnpm --frozen-lockfile, so the dependency cannot be dropped per app. It is dev-only and adds two deprecation notices on install (drizzle-kit's own @esbuild-kit dependencies). The template's .gitignore skips config/database/*.bak, the copy of schema.ts that `appkit db introspect` keeps. Signed-off-by: ditadi <victordperd@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #674.
Summary
Offers the DatabasePlugin in
databricks apps init, and documents the development flow end to end. The flow:appkit db initpoints.envat a Lakebase branch of your own.appkit db migratewrites and applies migrations as you changeconfig/database/schema.ts.appkit db verifychecks your branch, and with--prodthe deployed app.Details
database, sobeta.tsdrops its explicit export. Theappkit dbcommands are no longer hidden in the CLI.config/database/schema.tsuses schemaapp.appkit.plugins.jsongets thedatabaseentry, with thepostgresbinding for branch and database.README.md.tmplgets a development-workflow section andconfig/database/in the project structure._gitignoreskipsconfig/database/*.bak, the previousschema.tsthatintrospectkeeps.drizzle-kitis a template devDependency, sinceappkit db init/migrategenerate migrations with it.check-template-depskeeps it at the version AppKit pins, and its skew message gives each synced dependency its reason.apps initinstalls from the template's single committed lockfile (npm ci/pnpm --frozen-lockfile), so the dependency can't be dropped per app.@esbuild-kitdependencies.registry.npmjs.org. No existing package changes version.databricks apps initrunningappkit db initfor you is a separate Databricks CLI change. This PR should land once a CLI release with that change is out.Tests
verify/--prod.README.md.tmplwith Gotext/templateandmissingkey=zero, the wayapps initdoes, for four plugin sets: none, analytics, database, and both.tools/check-template-deps.tspasses. With the template's drizzle-kit version changed, it reports the new skew message.generate:typesandsync:template(no diff), the docs build, and 6075 tests.