* 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
* Fix use of db.batch in Stackblitz
* Update .changeset/rare-items-protect.md
---------
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* 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
* Add integrations API for adding db config/seed files
* Fix seeding when user seed file is present
* Add basic test and fixture for integrations API
* Freeze that lockfile
* Test to see if this is a Windows fix
* Don’t import.meta.glob integration seed files
* Make integration seed files export a default function
* style: rejiggle
* Fix temporary file conflicts
* Remove changes to Astro’s core types, type utility method instead
* Use `astro:db` instead of `@astrojs/db`
* Revert unnecessarily cautious temporary path name
This reverts commit ef2156e41b.
* Add changeset
* Fix entrypoints and `asDrizzleTable` usage in changeset
* Getting Nate in on the co-author action
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Fix user seed file in integrations fixture
* Update `seedLocal()` after merge
* Provide empty `seedFiles` array in `db execute`
---------
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* feat: check for --remote
* chore: remove bad ticketing example cols
* fix: get seed file working with build
* Revert "fix: get seed file working with build"
This reverts commit 92830a106164b0997c820a3e0bf2a582018084a0.
* fix: seed from build instead of runtime
* refactor: move recreateTables out of runtime
* Revert "refactor: move recreateTables out of runtime"
This reverts commit d01a802ad7915fabc4c4ac35b2d907eae0538d95.
* fix: in-memory db for test fixture
* chore: changeset
* refactor: generate random db name instead
* refactor: use yargs-parser for flag
* chore: remove in-memory db logi
* refactor: rename random id flag for clarity
* feat: support --remote in dev
* feat: support --remote on shell
* refactor: inline db client
* feat: support --remote on db execute
* chore: stray console log
* chore: remove recreateTables from runtime
* chore: update seeding for new signature
* chore: remove unused error imports
* Include virtual declaration in package
* Update .changeset/good-rats-bathe.md
---------
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>