0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
astro/packages/db/test
Ben Holmes 44bafa989a
[db] Fix duplicate calls to recreate tables on startup (#10919)
* 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>
2024-05-03 11:08:50 -04:00
..
fixtures [ci] format 2024-04-17 08:38:53 +00:00
unit refactor: rename "config" file to "virtual" (#10638) 2024-04-02 18:13:18 -04:00
basics.test.js Provide guidance when --remote is omitted (#10579) 2024-03-27 15:20:11 -04:00
db-in-src.test.js Fix db seeding when srcDir is root (#10720) 2024-04-09 09:11:32 -04:00
error-handling.test.js db: expose isDbError() utility (#10498) 2024-03-20 07:27:48 -04:00
integration-only.test.js Fix db for projects without a seed file or with integrations (#10385) 2024-03-11 20:07:53 +01:00
integrations.test.js Use static imports for integration seed files in astro:db (#10381) 2024-03-11 09:51:15 -04:00
local-prod.test.js [db] Fix duplicate calls to recreate tables on startup (#10919) 2024-05-03 11:08:50 -04:00
no-seed.test.js Fix db for projects without a seed file or with integrations (#10385) 2024-03-11 20:07:53 +01:00
ssr-no-apptoken.test.js Require that ASTRO_STUDIO_REMOTE_DB_URL is defined at runtime (#10533) 2024-03-22 11:52:38 -04:00
static-remote.test.js Fix building static sites with Astro DB (#10655) 2024-04-02 16:07:18 -04:00
test-utils.js [db] Fix duplicate calls to recreate tables on startup (#10919) 2024-05-03 11:08:50 -04:00