0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
Commit graph

11 commits

Author SHA1 Message Date
James Garbutt
2ebcf94d0a
chore(db): Add missing github-slugger dependency & tests (#10405)
* chore: add missing github-slugger dependency

* test: add column-queries data loss tests

* chore: remove unused vars

* test: assert length rather than message content
2024-03-19 17:10:33 +00:00
Ben Holmes
156c094c3e [ci] format 2024-03-18 11:56:49 +00:00
Ben Holmes
219c49473f
fix type error in seed stub on initial setup (#10457)
* fix: move db type to base types for seed stub

* chore: changeset

* fix(test): bad NOW import
2024-03-18 07:55:39 -04:00
Ben Holmes
41ca94e513
chore: remove drop table check for added table (#10396)
* chore: remove drop table check for added table

* chore: remove drop table from test

* chore: changeset
2024-03-12 07:30:45 -04:00
Darius
f76dcb769f
export DB types (#10374)
* export DB types

* refactor: move schemas to separate file

* chore: changeset

* chore: add typesVersions

---------

Co-authored-by: bholmesdev <hey@bholmes.dev>
2024-03-11 18:06:52 -04:00
Matthew Phillips
652bd497dc [ci] format 2024-03-07 16:38:45 +00:00
Matthew Phillips
9f422e9bd3
db: rename experimentalVersion to version (#10348)
* db: rename experimentalVersion to version

* Fix tests

* Update .changeset/fluffy-bobcats-arrive.md

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-03-07 11:37:36 -05:00
Fred K. Schott
51393a729b [ci] format 2024-03-04 10:51:57 +00:00
Fred K. Schott
93ec9e264a
add new migrations system (#10312) 2024-03-04 02:50:58 -08:00
Ben Holmes
25fe5bd040 [ci] format 2024-03-02 00:31:00 +00:00
Ben Holmes
3488be9b59
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 37585ce5cb.

* 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 46fd65d61a.

* Revert "wip: fix windows file import"

This reverts commit 1a669ea646.

* 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>
2024-03-01 19:29:55 -05:00
Renamed from packages/db/test/unit/field-queries.test.js (Browse further)