ORM-17: Port test fixtures and tests to the ambient API and migrations #17
Labels
No labels
area:core
area:database
area:migrations
area:model
area:relations
area:schema
area:tests
breaking-change
size:M
size:S
tracking
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
NoctisWolfshadow/tessera-orm#17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Depends on: #11, #16
Context
The fixtures still build their schema with a raw
CREATE TABLEand pass&connaround. Once migrations and the ambient API exist, the tests should use them: it proves both work and removes the last directConnectionhandling from tests. (This was originally planned for the migrations milestone, but it needs the ambientall().)Tasks
tests/common::setup()becomesDatabase::connect_thread(Config::memory())plusMigrator::new(migrations()).run(), seeding withUser::create.CREATE TABLEin tests with a migration, and every.all_on(&conn)with.all().it_workstest with real tests.Example
Acceptance criteria
Connectiondirectly.CREATE TABLE.Queryterminals and a singlehydratepath #14Model::schema()and a schema drift check #26