mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 13:10:29 +00:00
89f3055a29
The link table keyed by the trip id made both entities a one-to-one, and the test typecheck failed with TS2589 in the itinerary factory. It now holds its own id with trip_id UNIQUE, as trip_invite_tokens does, and its members hang off link_id. The factory error was not this table's alone: any further relation on trips, journeys or users tipped the same check. insertRow and createRow now take a caller's overrides as their own argument instead of a spread checked against RequiredEntityData, so a new relation no longer breaks the itinerary and tour factories. The suites that hand-build TripMembersService get a journalLinksStub.
12 lines
381 B
TypeScript
12 lines
381 B
TypeScript
// Generated by scripts/generate-db-types.ts from the migrated schema. Do not edit by hand:
|
|
// change the migration, then run `npm run gen:db-types`.
|
|
import type { InsertOptional } from './columns';
|
|
|
|
export interface TripJournalLinkMembersTable {
|
|
link_id: number;
|
|
user_id: number;
|
|
role: InsertOptional<string>;
|
|
hide_skeletons: InsertOptional<number>;
|
|
added_at: number;
|
|
}
|