diff options
author | 2024-03-01 19:29:55 -0500 | |
---|---|---|
committer | 2024-03-01 19:29:55 -0500 | |
commit | 3488be9b59d1cb65325b0e087c33bcd74aaa4926 (patch) | |
tree | 6582db4f35eb2b92ee574a7a9c507c93a5d17452 /packages/db/test/unit/index-queries.test.js | |
parent | 4b6e2fb69b241c982c82a2f13d603b2057c345af (diff) | |
download | astro-3488be9b59d1cb65325b0e087c33bcd74aaa4926.tar.gz astro-3488be9b59d1cb65325b0e087c33bcd74aaa4926.tar.zst astro-3488be9b59d1cb65325b0e087c33bcd74aaa4926.zip |
finalize WIP API (#10280)
* feat: no more readable / writable
* fix: table typegen
* wip: move data seeding
* chore: add scripts to basics
* feat: data() -> seed file
* refactor: ensure precedence of file name
* feat: db execute command
* fix: test imports
* chore: remove old readable error tests
* feat: support local db with `db execute`
* refactor: remove integrations from test for now
* chore: stray comment
* chore: remove `table` config object
* feat: `db.batch`!
* refactor: move migrations/ inside db/
* fix: move ticketing-example to seed file
* fix: disable foreign keys when recreating tables
* refactor: standardize migrations dir
* feat: move to db/config.ts
* feat: file watching for db/config.ts dependencies
* feat: remove unsafeDisableStudio
* chroe: remove bad import
* feat: parse config.ts from cli
* chore: remove async from localDatabaseClient
* fix: update recipes config and seed
* chore: update unit tests
* chore: update tests to dev server
* refactor: collectionToTable -> asDrizzleTable
* chore: tidy up collection -> table error states
* refactor: regexp -> endsWith
* feat: pretty error inserting into table
* refactor: try/catch -> catch()
* feat: expose utils for integration seed files
* fix: add config import to db client modules
* fix: just use generic "seeding database" error
* chore: remove unused link args
* fix: migration queries im,port
* chore: remove irrelevant glob/ example
* feat: format migration file path
* feat: support all config file names
* chore: remove db.batch() for now
* chore: remove `db` object
* core: remove unused integration file
* chore: changeset
* fix: foreign key empty error message
* chore: remove old TODO
* fix: bad context reference
* refactor: seedDev -> seedLocal
* wip: throw some console logs at github
* wip: avoid seeding astro:db imported by seed file
* wip: use anything in db/
* refactor: only seed when loaded within srcDir
* refactor: avoid resolution when not seeding
* chore: remove logs
* refactor: seed within create local db client
* refactor: use normalizePath
* wip: logs
* wip: logs
* refactor: early return
* chore: more logs
* refactor: no batch
* fix: use beforeAll
* refactor: move all tests to base block
* wip: log dev server starting
* chore: remove logs
* wip: demo ready
* chore: remove duplicate recreateTables() call
* Revert "wip: demo ready"
This reverts commit 37585ce5cb4cce8dcc750d8752e0eb02418b5c87.
* refactor: beforeEach to isolate dev servers
* chore: remove useBundledDbUrl
* refactor: naming and seed scope
* chore: remove stray console logs
* wip: fix windows file import
* wip: try fileURLToPath
* Revert "wip: try fileURLToPath"
This reverts commit 46fd65d61a8a285c2d507d524734369a3b97a1a0.
* Revert "wip: fix windows file import"
This reverts commit 1a669ea646e2dc91ca120539431c10f0793a20f3.
* refactor: dir -> directory
* refactor: move execute file to cli
* refactor: remove seed.dev convention
* wip: attempt fileURLToPath
* wip: debug the file exists
* fix: use mjs??
* chore: remove duplicate seedLocal
* chore: remove log check
* refactor: use in memory db for tests
* chore: clean up test comment
* fix: avoid file writes for db setup on in memory db
* chore: bump db changeset to minor
---------
Co-authored-by: Nate Moore <nate@astro.build>
Diffstat (limited to 'packages/db/test/unit/index-queries.test.js')
-rw-r--r-- | packages/db/test/unit/index-queries.test.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/db/test/unit/index-queries.test.js b/packages/db/test/unit/index-queries.test.js index 17b2599bd..5e9b2130d 100644 --- a/packages/db/test/unit/index-queries.test.js +++ b/packages/db/test/unit/index-queries.test.js @@ -1,9 +1,10 @@ import { expect } from 'chai'; import { describe, it } from 'mocha'; import { getCollectionChangeQueries } from '../../dist/core/cli/migration-queries.js'; -import { collectionSchema, column } from '../../dist/core/types.js'; +import { column } from '../../dist/runtime/config.js'; +import { tableSchema } from '../../dist/core/types.js'; -const userInitial = collectionSchema.parse({ +const userInitial = tableSchema.parse({ columns: { name: column.text(), age: column.number(), |