* fix: move recreateTables() to integration hooks
* feat: recreate and seed at load, not in virtual runtime
* feat: eager build db on startup and seed file change
* fix: respect database_file in dbUrl
* chore: remove duplicate recreateTables call
* chore: remove now self-explanatory comments
* fix: remove invalidateModule call for eager loading
* feat: respect seed package paths
* fix: remove duplicate recreateTables() call
* refactor: move recreateTables() to vite-plugin-db
* refactor: move queries.ts from runtime/ to core/
* fix: update test import to core/queries
* refactor: move executeSeedFile to vite-plugin-db
* refactor: extract seeding and recreating to helper fns
* chore: changeset
* chore: revert connectToStudio refactor
* wip: log db url
* fix(test): normalize astro_database_file flag for windows
* Revert "wip: log db url"
This reverts commit 558e2de67a09a611377929b625127c649b8504d6.
* Revert "Revert "wip: log db url""
This reverts commit ffd004e00dff485b7bc5ddde0278dde6ff058b9e.
* fix: correctly resolve relative paths with unit test
* chore: remove unused dbDirPath
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* chore: remove unused import
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* chore: remove unused type
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* fix: remove bad import
* [db] Load seed files with vite dev server (#10941)
* feat: load seed files with full vite dev server
* chore: remove unused export
---------
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* feat: add indexes array config with name gen
* fix: add _idx suffix, remove name from output
* feat(test): new index config
* chore: remove unused type
* chore: changeset
* chore: add sort() for consistent names
* feat(test): consistent column ordering
* feat(test): ensure no queries when migrating legacy to new
* fix(db): validate column type before column schema
* add changeset
* Add test for text foreign keys
---------
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* Add fixture and tests for integration with no user db config
* Create database tables when integration seed files load
* Defer running seed function until all modules are loaded
* Update package name
* Add test & fixture for a project with no seed file
* `recreateTables()` from `seedLocal()` (and move it out of main runtime module)
* Fix typo after rebase
* FREEZE DON’T MOVE
* Move `seedLocal` export back to runtime
* Simplify seed file normalization
* Clean up test files
* Add build tests for no-seed and integration-only fixtures
* Add changeset
* Use static imports for integration seed files in `astro:db`
* Add changeset
* Add build test for integrations fixture
* chore: comment on top-level seed imports
* fix: random db id for tests
* fix: set db id from build before
* wip: remove reset on env variable
* wip: move random db id env to top of test file
* refactor: remove unlink from db startup
* chore: remove random db id completely??
---------
Co-authored-by: bholmesdev <hey@bholmes.dev>
* deps: drizzle preview
* feat: db.batch and method run handling
* refactor: use db.batch in test fixture
* deps: bump to drizzle 0.29.5
* chore: changeset
* fix: unpin drizzle version
* fix: db execute should uh... execute