refactor(db): generate the Kysely table types from the migrated schema

The repositories typed their Kysely statements against 159 table interfaces
written by hand, one or more per repository. Nothing compared them with the
schema: a migration that renamed a column or changed its type left them
stale while tsc stayed green, and several had already drifted
(reservations.accommodation_id is TEXT, not INTEGER).

scripts/generate-db-types.ts migrates a throwaway database with the real
migrations, reads every table back and writes one interface per table into
src/db/kysely/ plus the DB map in db.ts. Every hand-written interface is now
Pick<DB, ...> of that type, and npm run check:db-types fails when the
committed files no longer match the migrations.

A column an insert may leave out (rowid, DEFAULT, nullable) is
InsertOptional<T>, declared as ColumnType<T, T | void, T>. The server
compiles without strictNullChecks, where Kysely's own Generated<T> still
demands the column; that is why the old code kept separate insert-only
interfaces. The ids callers pass as number | string are cast to the column
type at the bind, so every statement binds the same value as before.
This commit is contained in:
Maurice
2026-10-08 15:07:48 +02:00
parent ee921d5c28
commit 5f17a5df50
227 changed files with 3244 additions and 1394 deletions
+15
View File
@@ -0,0 +1,15 @@
// 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 AddonsTable {
id: string;
name: string;
description: InsertOptional<string | null>;
type: InsertOptional<string>;
icon: InsertOptional<string | null>;
enabled: InsertOptional<number | null>;
config: InsertOptional<string | null>;
sort_order: InsertOptional<number | null>;
}
@@ -0,0 +1,9 @@
// 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 AppSettingsTable {
key: string;
value: InsertOptional<string | null>;
}
@@ -0,0 +1,10 @@
// 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 AssignmentParticipantsTable {
id: InsertOptional<number>;
assignment_id: number;
user_id: number;
}
+14
View File
@@ -0,0 +1,14 @@
// 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 AuditLogTable {
id: InsertOptional<number>;
created_at: InsertOptional<string | null>;
user_id: InsertOptional<number | null>;
action: string;
resource: InsertOptional<string | null>;
details: InsertOptional<string | null>;
ip: InsertOptional<string | null>;
}
+19
View File
@@ -0,0 +1,19 @@
// 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 BucketListTable {
id: InsertOptional<number>;
user_id: number;
name: string;
lat: InsertOptional<number | null>;
lng: InsertOptional<number | null>;
country_code: InsertOptional<string | null>;
notes: InsertOptional<string | null>;
created_at: InsertOptional<string | null>;
target_date: InsertOptional<string | null>;
visited_at: InsertOptional<string | null>;
visited_source: InsertOptional<string | null>;
region_code: InsertOptional<string | null>;
}
@@ -0,0 +1,10 @@
// 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 BudgetCategoryOrderTable {
trip_id: number;
category: string;
sort_order: InsertOptional<number>;
}
@@ -0,0 +1,12 @@
// 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 BudgetItemMembersTable {
id: InsertOptional<number>;
budget_item_id: number;
user_id: number;
paid: InsertOptional<number>;
amount: InsertOptional<number | null>;
}
@@ -0,0 +1,11 @@
// 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 BudgetItemPayersTable {
id: InsertOptional<number>;
budget_item_id: number;
user_id: number;
amount: InsertOptional<number>;
}
+24
View File
@@ -0,0 +1,24 @@
// 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 BudgetItemsTable {
id: InsertOptional<number>;
trip_id: number;
category: InsertOptional<string>;
name: string;
total_price: InsertOptional<number>;
persons: InsertOptional<number | null>;
days: InsertOptional<number | null>;
note: InsertOptional<string | null>;
sort_order: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
paid_by_user_id: InsertOptional<number | null>;
expense_date: InsertOptional<string | null>;
reservation_id: InsertOptional<number | null>;
currency: InsertOptional<string | null>;
exchange_rate: InsertOptional<number>;
ticket_json: InsertOptional<string | null>;
place_id: InsertOptional<number | null>;
}
@@ -0,0 +1,18 @@
// 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 BudgetSettlementsTable {
id: InsertOptional<number>;
trip_id: number;
from_user_id: number;
to_user_id: number;
amount: InsertOptional<number>;
created_at: InsertOptional<string | null>;
created_by_user_id: InsertOptional<number | null>;
currency: InsertOptional<string | null>;
exchange_rate: InsertOptional<number>;
settled_at: InsertOptional<string | null>;
note: InsertOptional<string | null>;
}
+13
View File
@@ -0,0 +1,13 @@
// 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 CategoriesTable {
id: InsertOptional<number>;
name: string;
color: InsertOptional<string | null>;
icon: InsertOptional<string | null>;
user_id: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
}
+15
View File
@@ -0,0 +1,15 @@
// 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 CollabLinksTable {
id: InsertOptional<number>;
trip_id: number;
user_id: number;
title: string;
url: string;
pinned: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
updated_at: InsertOptional<string | null>;
}
@@ -0,0 +1,12 @@
// 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 CollabMessageReactionsTable {
id: InsertOptional<number>;
message_id: number;
user_id: number;
emoji: string;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,14 @@
// 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 CollabMessagesTable {
id: InsertOptional<number>;
trip_id: number;
user_id: number;
text: string;
reply_to: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
deleted: InsertOptional<number | null>;
}
+18
View File
@@ -0,0 +1,18 @@
// 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 CollabNotesTable {
id: InsertOptional<number>;
trip_id: number;
user_id: number;
category: InsertOptional<string | null>;
title: string;
content: InsertOptional<string | null>;
color: InsertOptional<string | null>;
pinned: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
updated_at: InsertOptional<string | null>;
website: InsertOptional<string | null>;
}
@@ -0,0 +1,12 @@
// 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 CollabPollVotesTable {
id: InsertOptional<number>;
poll_id: number;
user_id: number;
option_index: number;
created_at: InsertOptional<string | null>;
}
+16
View File
@@ -0,0 +1,16 @@
// 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 CollabPollsTable {
id: InsertOptional<number>;
trip_id: number;
user_id: number;
question: string;
options: string;
multiple: InsertOptional<number | null>;
closed: InsertOptional<number | null>;
deadline: InsertOptional<string | null>;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,13 @@
// 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 CollectionLabelsTable {
id: InsertOptional<number>;
collection_id: number;
name: string;
color: InsertOptional<string | null>;
sort_order: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,13 @@
// 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 CollectionMembersTable {
id: InsertOptional<number>;
collection_id: number;
user_id: number;
status: InsertOptional<string>;
role: InsertOptional<string>;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,7 @@
// 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`.
export interface CollectionPlaceLabelsTable {
collection_place_id: number;
label_id: number;
}
@@ -0,0 +1,12 @@
// 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 CollectionPlaceRatingsTable {
id: InsertOptional<number>;
collection_place_id: number;
user_id: number;
rating: number;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,7 @@
// 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`.
export interface CollectionPlaceTagsTable {
collection_place_id: number;
tag_id: number;
}
@@ -0,0 +1,33 @@
// 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 CollectionPlacesTable {
id: InsertOptional<number>;
collection_id: number;
owner_id: number;
saved_by: InsertOptional<number | null>;
name: string;
description: InsertOptional<string | null>;
lat: InsertOptional<number | null>;
lng: InsertOptional<number | null>;
address: InsertOptional<string | null>;
category_id: InsertOptional<number | null>;
price: InsertOptional<number | null>;
currency: InsertOptional<string | null>;
notes: InsertOptional<string | null>;
image_url: InsertOptional<string | null>;
google_place_id: InsertOptional<string | null>;
google_ftid: InsertOptional<string | null>;
osm_id: InsertOptional<string | null>;
website: InsertOptional<string | null>;
phone: InsertOptional<string | null>;
status: InsertOptional<string>;
source_trip_id: InsertOptional<number | null>;
source_place_id: InsertOptional<number | null>;
links: InsertOptional<string | null>;
sort_order: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
updated_at: InsertOptional<string | null>;
}
+18
View File
@@ -0,0 +1,18 @@
// 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 CollectionsTable {
id: InsertOptional<number>;
owner_id: number;
name: string;
description: InsertOptional<string | null>;
color: InsertOptional<string | null>;
icon: InsertOptional<string | null>;
cover_image: InsertOptional<string | null>;
links: InsertOptional<string | null>;
sort_order: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
updated_at: InsertOptional<string | null>;
}
@@ -0,0 +1,18 @@
// 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 DawarichConnectionsTable {
user_id: InsertOptional<number>;
url: InsertOptional<string | null>;
api_key: InsertOptional<string | null>;
allow_insecure_tls: InsertOptional<number>;
sync_enabled: InsertOptional<number>;
last_sync_at: InsertOptional<string | null>;
last_sync_state: InsertOptional<string>;
last_sync_error: InsertOptional<string | null>;
capabilities: InsertOptional<string | null>;
created_at: InsertOptional<string | null>;
updated_at: InsertOptional<string | null>;
}
@@ -0,0 +1,33 @@
// 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 DawarichVisitSuggestionsTable {
id: InsertOptional<number>;
user_id: number;
source_visit_id: string;
trip_id: InsertOptional<number | null>;
name: string;
lat: InsertOptional<number | null>;
lng: InsertOptional<number | null>;
started_at: string;
ended_at: string;
duration_minutes: InsertOptional<number>;
local_date: string;
source_status: InsertOptional<string>;
confidence: InsertOptional<number | null>;
confidence_band: InsertOptional<string | null>;
country_code: InsertOptional<string | null>;
state: InsertOptional<string>;
target: InsertOptional<string | null>;
accepted_place_id: InsertOptional<number | null>;
accepted_journal_entry_id: InsertOptional<number | null>;
accepted_bucket_list_item_id: InsertOptional<number | null>;
matched_bucket_list_item_id: InsertOptional<number | null>;
source_hash: string;
accepted_hash: InsertOptional<string | null>;
source_missing_at: InsertOptional<string | null>;
first_seen_at: InsertOptional<string>;
last_seen_at: InsertOptional<string>;
}
@@ -0,0 +1,18 @@
// 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 DayAccommodationsTable {
id: InsertOptional<number>;
trip_id: number;
place_id: InsertOptional<number | null>;
start_day_id: number;
end_day_id: number;
check_in: InsertOptional<string | null>;
check_in_end: InsertOptional<string | null>;
check_out: InsertOptional<string | null>;
confirmation: InsertOptional<string | null>;
notes: InsertOptional<string | null>;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,23 @@
// 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 DayAssignmentsTable {
id: InsertOptional<number>;
day_id: number;
place_id: number;
order_index: InsertOptional<number | null>;
notes: InsertOptional<string | null>;
reservation_status: InsertOptional<string | null>;
reservation_notes: InsertOptional<string | null>;
reservation_datetime: InsertOptional<string | null>;
created_at: InsertOptional<string | null>;
assignment_time: InsertOptional<string | null>;
assignment_end_time: InsertOptional<string | null>;
leg_transport_mode: InsertOptional<string | null>;
incoming_leg_transport_mode: InsertOptional<string | null>;
end_day: InsertOptional<number>;
accommodation_id: InsertOptional<number | null>;
route_excluded: InsertOptional<number>;
}
+16
View File
@@ -0,0 +1,16 @@
// 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 DayNotesTable {
id: InsertOptional<number>;
day_id: number;
trip_id: number;
text: string;
time: InsertOptional<string | null>;
icon: InsertOptional<string | null>;
sort_order: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
color: InsertOptional<string | null>;
}
+14
View File
@@ -0,0 +1,14 @@
// 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 DaysTable {
id: InsertOptional<number>;
trip_id: number;
day_number: number;
date: InsertOptional<string | null>;
notes: InsertOptional<string | null>;
title: InsertOptional<string | null>;
default_transport_mode: InsertOptional<string | null>;
}
@@ -0,0 +1,21 @@
// 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 DocumentConnectionsTable {
id: InsertOptional<number>;
trip_id: number;
provider_id: string;
owner_user_id: number;
base_url: string;
secrets: InsertOptional<string | null>;
settings: InsertOptional<string>;
allow_insecure_tls: InsertOptional<number>;
capabilities: InsertOptional<string | null>;
last_probe_at: InsertOptional<string | null>;
last_probe_state: InsertOptional<string>;
last_probe_error: InsertOptional<string | null>;
created_at: InsertOptional<string | null>;
updated_at: InsertOptional<string | null>;
}
@@ -0,0 +1,17 @@
// 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 DocumentProviderFieldsTable {
id: InsertOptional<number>;
provider_id: string;
field_key: string;
label: string;
input_type: InsertOptional<string>;
placeholder: InsertOptional<string | null>;
hint: InsertOptional<string | null>;
required: InsertOptional<number | null>;
secret: InsertOptional<number | null>;
sort_order: InsertOptional<number | null>;
}
@@ -0,0 +1,13 @@
// 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 DocumentProvidersTable {
id: string;
name: string;
description: InsertOptional<string | null>;
icon: InsertOptional<string | null>;
enabled: InsertOptional<number | null>;
sort_order: InsertOptional<number | null>;
}
@@ -0,0 +1,28 @@
// 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 DocumentSyncItemsTable {
id: InsertOptional<number>;
link_id: number;
trip_id: number;
file_id: InsertOptional<number | null>;
trek_doc_uid: string;
remote_id: InsertOptional<string | null>;
remote_name: InsertOptional<string | null>;
remote_version: InsertOptional<string | null>;
remote_size: InsertOptional<number | null>;
remote_modified_at: InsertOptional<string | null>;
content_sha256: InsertOptional<string | null>;
pushed_sha256: InsertOptional<string | null>;
state: InsertOptional<string>;
error_code: InsertOptional<string | null>;
attempts: InsertOptional<number>;
next_attempt_at: InsertOptional<string | null>;
remote_missing_at: InsertOptional<string | null>;
first_seen_at: InsertOptional<string>;
last_seen_at: InsertOptional<string>;
synced_at: InsertOptional<string | null>;
remote_trashed_at: InsertOptional<string | null>;
}
+14
View File
@@ -0,0 +1,14 @@
// 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 FileLinksTable {
id: InsertOptional<number>;
file_id: number;
reservation_id: InsertOptional<number | null>;
assignment_id: InsertOptional<number | null>;
place_id: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
budget_item_id: InsertOptional<number | null>;
}
@@ -0,0 +1,9 @@
// 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 GoogleApiUsageTable {
day: string;
calls: InsertOptional<number>;
}
@@ -0,0 +1,11 @@
// 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 GooglePlacePhotoMetaTable {
place_id: string;
attribution: InsertOptional<string | null>;
fetched_at: number;
error_at: InsertOptional<number | null>;
}
@@ -0,0 +1,11 @@
// 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 HiddenCountriesTable {
id: InsertOptional<number>;
user_id: number;
country_code: string;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,12 @@
// 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 HiddenRegionsTable {
id: InsertOptional<number>;
user_id: number;
region_code: string;
country_code: string;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,14 @@
// 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 IdempotencyKeysTable {
key: string;
user_id: number;
method: string;
path: string;
status_code: number;
response_body: string;
created_at: InsertOptional<number>;
}
@@ -0,0 +1,15 @@
// 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 InviteTokensTable {
id: InsertOptional<number>;
token: string;
max_uses: InsertOptional<number>;
used_count: InsertOptional<number>;
expires_at: InsertOptional<string | null>;
created_by: number;
created_at: InsertOptional<string | null>;
trip_id: InsertOptional<number | null>;
}
@@ -0,0 +1,16 @@
// 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 JourneyBooksTable {
id: InsertOptional<number>;
journey_id: number;
title: InsertOptional<string>;
document: string;
version: InsertOptional<number>;
created_by: InsertOptional<number | null>;
updated_by: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
updated_at: InsertOptional<string | null>;
}
@@ -0,0 +1,12 @@
// 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 JourneyContributorsTable {
journey_id: number;
user_id: number;
role: string;
added_at: number;
hide_skeletons: InsertOptional<number>;
}
@@ -0,0 +1,33 @@
// 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 JourneyEntriesTable {
id: InsertOptional<number>;
journey_id: number;
source_trip_id: InsertOptional<number | null>;
source_place_id: InsertOptional<number | null>;
author_id: number;
type: string;
title: InsertOptional<string | null>;
story: InsertOptional<string | null>;
entry_date: string;
entry_time: InsertOptional<string | null>;
location_name: InsertOptional<string | null>;
location_lat: InsertOptional<number | null>;
location_lng: InsertOptional<number | null>;
mood: InsertOptional<string | null>;
weather: InsertOptional<string | null>;
tags: InsertOptional<string | null>;
visibility: InsertOptional<string | null>;
sort_order: InsertOptional<number | null>;
created_at: number;
updated_at: number;
pros_cons: InsertOptional<string | null>;
stats_excluded: InsertOptional<number>;
dismissed: InsertOptional<number>;
country_code: InsertOptional<string | null>;
source_assignment_id: InsertOptional<number | null>;
is_draft: InsertOptional<number>;
}
@@ -0,0 +1,11 @@
// 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 JourneyEntryPhotosTable {
entry_id: number;
journey_photo_id: number;
sort_order: InsertOptional<number | null>;
created_at: number;
}
@@ -0,0 +1,17 @@
// 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 JourneyPhotosTable {
id: InsertOptional<number>;
journey_id: number;
photo_id: number;
caption: InsertOptional<string | null>;
shared: InsertOptional<number | null>;
sort_order: InsertOptional<number | null>;
provider: InsertOptional<string | null>;
asset_id: InsertOptional<string | null>;
owner_id: InsertOptional<number | null>;
created_at: number;
}
@@ -0,0 +1,16 @@
// 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 JourneyShareTokensTable {
id: InsertOptional<number>;
journey_id: number;
token: string;
created_by: number;
share_timeline: InsertOptional<number | null>;
share_gallery: InsertOptional<number | null>;
share_map: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
newest_first: InsertOptional<number>;
}
@@ -0,0 +1,8 @@
// 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`.
export interface JourneyTripsTable {
journey_id: number;
trip_id: number;
added_at: number;
}
+22
View File
@@ -0,0 +1,22 @@
// 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 JourneysTable {
id: InsertOptional<number>;
user_id: number;
title: string;
subtitle: InsertOptional<string | null>;
cover_gradient: InsertOptional<string | null>;
status: InsertOptional<string | null>;
created_at: number;
updated_at: number;
cover_image: InsertOptional<string | null>;
show_trip_tracks: InsertOptional<number>;
show_verdict: InsertOptional<number>;
show_mood: InsertOptional<number>;
show_weather: InsertOptional<number>;
status_override: InsertOptional<string | null>;
photo_location: InsertOptional<number>;
}
+17
View File
@@ -0,0 +1,17 @@
// 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 McpTokensTable {
id: InsertOptional<number>;
user_id: number;
name: string;
token_hash: string;
token_prefix: string;
created_at: InsertOptional<string | null>;
last_used_at: InsertOptional<string | null>;
kind: InsertOptional<string>;
scope_mode: InsertOptional<string>;
api_scopes: InsertOptional<string | null>;
}
+10
View File
@@ -0,0 +1,10 @@
// 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 MigrationsTable {
id: InsertOptional<number>;
timestamp: number;
name: string;
}
@@ -0,0 +1,11 @@
// 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 NotificationChannelPreferencesTable {
user_id: number;
event_type: string;
channel: string;
enabled: InsertOptional<number>;
}
@@ -0,0 +1,26 @@
// 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 NotificationsTable {
id: InsertOptional<number>;
type: string;
scope: string;
target: number;
sender_id: InsertOptional<number | null>;
recipient_id: number;
title_key: string;
title_params: InsertOptional<string | null>;
text_key: string;
text_params: InsertOptional<string | null>;
positive_text_key: InsertOptional<string | null>;
negative_text_key: InsertOptional<string | null>;
positive_callback: InsertOptional<string | null>;
negative_callback: InsertOptional<string | null>;
response: InsertOptional<string | null>;
navigate_text_key: InsertOptional<string | null>;
navigate_target: InsertOptional<string | null>;
is_read: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,18 @@
// 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 OauthClientsTable {
id: string;
user_id: InsertOptional<number | null>;
name: string;
client_id: string;
client_secret_hash: string;
redirect_uris: InsertOptional<string>;
allowed_scopes: InsertOptional<string>;
created_at: InsertOptional<string | null>;
is_public: InsertOptional<number>;
created_via: InsertOptional<string>;
allows_client_credentials: InsertOptional<number>;
}
@@ -0,0 +1,12 @@
// 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 OauthConsentsTable {
id: InsertOptional<number>;
client_id: string;
user_id: number;
scopes: InsertOptional<string>;
updated_at: InsertOptional<string | null>;
}
+19
View File
@@ -0,0 +1,19 @@
// 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 OauthTokensTable {
id: InsertOptional<number>;
client_id: string;
user_id: number;
access_token_hash: string;
refresh_token_hash: string;
scopes: InsertOptional<string>;
access_token_expires_at: string;
refresh_token_expires_at: string;
revoked_at: InsertOptional<string | null>;
created_at: InsertOptional<string | null>;
parent_token_id: InsertOptional<number | null>;
audience: InsertOptional<string | null>;
}
@@ -0,0 +1,7 @@
// 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`.
export interface PackingBagMembersTable {
bag_id: number;
user_id: number;
}
+15
View File
@@ -0,0 +1,15 @@
// 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 PackingBagsTable {
id: InsertOptional<number>;
trip_id: number;
name: string;
color: InsertOptional<string>;
weight_limit_grams: InsertOptional<number | null>;
sort_order: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
user_id: InsertOptional<number | null>;
}
@@ -0,0 +1,11 @@
// 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 PackingCategoryAssigneesTable {
id: InsertOptional<number>;
trip_id: number;
category_name: string;
user_id: number;
}
@@ -0,0 +1,11 @@
// 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 PackingItemContributorsTable {
item_id: number;
user_id: number;
status: InsertOptional<string>;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,7 @@
// 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`.
export interface PackingItemRecipientsTable {
item_id: number;
user_id: number;
}
@@ -0,0 +1,21 @@
// 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 PackingItemsTable {
id: InsertOptional<number>;
trip_id: number;
name: string;
checked: InsertOptional<number | null>;
category: InsertOptional<string | null>;
sort_order: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
weight_grams: InsertOptional<number | null>;
bag_id: InsertOptional<number | null>;
quantity: InsertOptional<number>;
updated_at: InsertOptional<string | null>;
is_private: InsertOptional<number>;
owner_id: InsertOptional<number | null>;
packed_quantity: InsertOptional<number | null>;
}
@@ -0,0 +1,11 @@
// 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 PackingTemplateCategoriesTable {
id: InsertOptional<number>;
template_id: number;
name: string;
sort_order: InsertOptional<number>;
}
@@ -0,0 +1,14 @@
// 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 PackingTemplateItemsTable {
id: InsertOptional<number>;
category_id: number;
name: string;
sort_order: InsertOptional<number>;
weight_grams: InsertOptional<number | null>;
quantity: InsertOptional<number>;
bag_name: InsertOptional<string | null>;
}
@@ -0,0 +1,11 @@
// 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 PackingTemplatesTable {
id: InsertOptional<number>;
name: string;
created_by: number;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,14 @@
// 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 PasswordResetTokensTable {
id: InsertOptional<number>;
user_id: number;
token_hash: string;
expires_at: string;
consumed_at: InsertOptional<string | null>;
created_at: InsertOptional<string | null>;
created_ip: InsertOptional<string | null>;
}
@@ -0,0 +1,19 @@
// 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 PhotoProviderFieldsTable {
id: InsertOptional<number>;
provider_id: string;
field_key: string;
label: string;
input_type: InsertOptional<string>;
placeholder: InsertOptional<string | null>;
hint: InsertOptional<string | null>;
required: InsertOptional<number | null>;
secret: InsertOptional<number | null>;
settings_key: InsertOptional<string | null>;
payload_key: InsertOptional<string | null>;
sort_order: InsertOptional<number | null>;
}
@@ -0,0 +1,13 @@
// 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 PhotoProvidersTable {
id: string;
name: string;
description: InsertOptional<string | null>;
icon: InsertOptional<string | null>;
enabled: InsertOptional<number | null>;
sort_order: InsertOptional<number | null>;
}
+18
View File
@@ -0,0 +1,18 @@
// 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 PhotosTable {
id: InsertOptional<number>;
trip_id: number;
day_id: InsertOptional<number | null>;
place_id: InsertOptional<number | null>;
filename: string;
original_name: string;
file_size: InsertOptional<number | null>;
mime_type: InsertOptional<string | null>;
caption: InsertOptional<string | null>;
taken_at: InsertOptional<string | null>;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,12 @@
// 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 PlaceDetailsCacheTable {
place_id: string;
lang: InsertOptional<string>;
expanded: InsertOptional<number>;
payload_json: string;
fetched_at: number;
}
@@ -0,0 +1,12 @@
// 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 PlaceRatingsTable {
id: InsertOptional<number>;
place_id: number;
user_id: number;
rating: number;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,11 @@
// 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 PlaceRegionsTable {
place_id: InsertOptional<number>;
country_code: string;
region_code: string;
region_name: string;
}
@@ -0,0 +1,20 @@
// 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 PlaceShadowPicksTable {
id: InsertOptional<number>;
created_at: InsertOptional<string>;
query: string;
lang: InsertOptional<string | null>;
bias_lat: InsertOptional<number | null>;
bias_lng: InsertOptional<number | null>;
source: string;
live_rank: number;
live_count: number;
picked_name: string;
picked_lat: number;
picked_lng: number;
picked_place_id: InsertOptional<string | null>;
}
+7
View File
@@ -0,0 +1,7 @@
// 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`.
export interface PlaceTagsTable {
place_id: number;
tag_id: number;
}
+41
View File
@@ -0,0 +1,41 @@
// 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 PlacesTable {
id: InsertOptional<number>;
trip_id: number;
name: string;
description: InsertOptional<string | null>;
lat: InsertOptional<number | null>;
lng: InsertOptional<number | null>;
address: InsertOptional<string | null>;
category_id: InsertOptional<number | null>;
price: InsertOptional<number | null>;
currency: InsertOptional<string | null>;
reservation_status: InsertOptional<string | null>;
reservation_notes: InsertOptional<string | null>;
reservation_datetime: InsertOptional<string | null>;
place_time: InsertOptional<string | null>;
end_time: InsertOptional<string | null>;
duration_minutes: InsertOptional<number | null>;
notes: InsertOptional<string | null>;
image_url: InsertOptional<string | null>;
google_place_id: InsertOptional<string | null>;
google_ftid: InsertOptional<string | null>;
website: InsertOptional<string | null>;
phone: InsertOptional<string | null>;
transport_mode: InsertOptional<string | null>;
created_at: InsertOptional<string | null>;
updated_at: InsertOptional<string | null>;
osm_id: InsertOptional<string | null>;
route_geometry: InsertOptional<string | null>;
route_color: InsertOptional<string | null>;
stop_type: InsertOptional<string | null>;
fill_percent: InsertOptional<number | null>;
amap_poi_id: InsertOptional<string | null>;
source: InsertOptional<string | null>;
email: InsertOptional<string | null>;
opening_hours: InsertOptional<string | null>;
}
@@ -0,0 +1,14 @@
// 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 PluginActionsTable {
plugin_id: string;
action_key: string;
label: string;
hint: InsertOptional<string | null>;
danger: InsertOptional<number>;
sort_order: InsertOptional<number>;
scope: InsertOptional<string>;
}
@@ -0,0 +1,16 @@
// 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 PluginCapabilityAuditTable {
id: InsertOptional<number>;
plugin_id: string;
acting_user_id: InsertOptional<number | null>;
method: string;
resource: InsertOptional<string | null>;
code: string;
ts: InsertOptional<string>;
prev_hash: InsertOptional<string | null>;
hash: string;
}
@@ -0,0 +1,11 @@
// 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 PluginEgressHostsTable {
id: InsertOptional<number>;
plugin_id: string;
host: string;
created_at: InsertOptional<string>;
}
@@ -0,0 +1,14 @@
// 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 PluginEntityMetadataTable {
id: InsertOptional<number>;
plugin_id: string;
entity_type: string;
entity_id: number;
key: string;
value: InsertOptional<string | null>;
updated_at: InsertOptional<string>;
}
@@ -0,0 +1,13 @@
// 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 PluginErrorLogTable {
id: InsertOptional<number>;
plugin_id: string;
ts: InsertOptional<string | null>;
level: InsertOptional<string>;
message: InsertOptional<string | null>;
stack: InsertOptional<string | null>;
}
@@ -0,0 +1,10 @@
// 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 PluginMetaMigrationsTable {
plugin_id: string;
migration_id: string;
applied_at: InsertOptional<string | null>;
}
@@ -0,0 +1,10 @@
// 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`.
export interface PluginOauthStateTable {
state: string;
plugin_id: string;
user_id: number;
verifier: string;
created_at: number;
}
@@ -0,0 +1,14 @@
// 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 PluginOauthTokensTable {
plugin_id: string;
user_id: number;
access_token: InsertOptional<string | null>;
refresh_token: InsertOptional<string | null>;
expires_at: InsertOptional<number | null>;
scope: InsertOptional<string | null>;
updated_at: InsertOptional<string>;
}
@@ -0,0 +1,14 @@
// 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 PluginScheduledTasksTable {
id: InsertOptional<number>;
plugin_id: string;
name: string;
due_at: number;
payload: InsertOptional<string>;
every_ms: InsertOptional<number | null>;
created_at: InsertOptional<string>;
}
@@ -0,0 +1,21 @@
// 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 PluginSettingsFieldsTable {
id: InsertOptional<number>;
plugin_id: string;
field_key: string;
label: InsertOptional<string | null>;
input_type: InsertOptional<string>;
placeholder: InsertOptional<string | null>;
hint: InsertOptional<string | null>;
required: InsertOptional<number>;
secret: InsertOptional<number>;
scope: InsertOptional<string>;
options: InsertOptional<string | null>;
oauth_config: InsertOptional<string | null>;
sort_order: InsertOptional<number>;
default_value: InsertOptional<string | null>;
}
@@ -0,0 +1,11 @@
// 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 PluginUserConfigTable {
plugin_id: string;
user_id: number;
config: InsertOptional<string>;
updated_at: InsertOptional<string>;
}
@@ -0,0 +1,11 @@
// 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 PluginUserErasureQueueTable {
id: InsertOptional<number>;
plugin_id: string;
user_id: number;
created_at: InsertOptional<string>;
}
+38
View File
@@ -0,0 +1,38 @@
// 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 PluginsTable {
id: string;
name: string;
description: InsertOptional<string | null>;
type: InsertOptional<string>;
icon: InsertOptional<string | null>;
version: InsertOptional<string | null>;
api_version: InsertOptional<number | null>;
min_trek_version: InsertOptional<string | null>;
permissions: InsertOptional<string | null>;
granted_permissions: InsertOptional<string | null>;
status: InsertOptional<string>;
config: InsertOptional<string | null>;
source_repo: InsertOptional<string | null>;
source_commit: InsertOptional<string | null>;
sha256: InsertOptional<string | null>;
crash_count: InsertOptional<number>;
last_error: InsertOptional<string | null>;
reviewed_at: InsertOptional<string | null>;
sort_order: InsertOptional<number>;
installed_at: InsertOptional<string | null>;
updated_at: InsertOptional<string | null>;
enabled: InsertOptional<number>;
capabilities: InsertOptional<string>;
author_pubkey: InsertOptional<string | null>;
dependencies: InsertOptional<string>;
operator_egress: InsertOptional<number>;
update_block_code: InsertOptional<string | null>;
update_block_detail: InsertOptional<string | null>;
update_block_version: InsertOptional<string | null>;
trek_range: InsertOptional<string | null>;
update_hold: InsertOptional<number>;
}
@@ -0,0 +1,17 @@
// 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 PushSubscriptionsTable {
id: InsertOptional<number>;
user_id: number;
endpoint: string;
p256dh: string;
auth: string;
vapid_public_key: string;
user_agent: InsertOptional<string | null>;
created_at: InsertOptional<string>;
last_success_at: InsertOptional<string | null>;
failure_count: InsertOptional<number>;
}
@@ -0,0 +1,8 @@
// 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`.
export interface ReservationDayPositionsTable {
reservation_id: number;
day_id: number;
position: number;
}
@@ -0,0 +1,19 @@
// 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 ReservationEndpointsTable {
id: InsertOptional<number>;
reservation_id: number;
role: string;
sequence: InsertOptional<number>;
name: string;
code: InsertOptional<string | null>;
lat: number;
lng: number;
timezone: InsertOptional<string | null>;
local_time: InsertOptional<string | null>;
local_date: InsertOptional<string | null>;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,10 @@
// 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 ReservationTravelersTable {
id: InsertOptional<number>;
reservation_id: number;
user_id: number;
}
@@ -0,0 +1,34 @@
// 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 ReservationsTable {
id: InsertOptional<number>;
trip_id: number;
day_id: InsertOptional<number | null>;
end_day_id: InsertOptional<number | null>;
place_id: InsertOptional<number | null>;
assignment_id: InsertOptional<number | null>;
title: string;
accommodation_id: InsertOptional<string | null>;
reservation_time: InsertOptional<string | null>;
reservation_end_time: InsertOptional<string | null>;
location: InsertOptional<string | null>;
confirmation_number: InsertOptional<string | null>;
notes: InsertOptional<string | null>;
status: InsertOptional<string | null>;
type: InsertOptional<string | null>;
created_at: InsertOptional<string | null>;
metadata: InsertOptional<string | null>;
day_plan_position: InsertOptional<number | null>;
needs_review: InsertOptional<number>;
external_source: InsertOptional<string | null>;
external_id: InsertOptional<string | null>;
external_owner_user_id: InsertOptional<number | null>;
external_synced_at: InsertOptional<string | null>;
sync_enabled: InsertOptional<number | null>;
external_hash: InsertOptional<string | null>;
url: InsertOptional<string | null>;
ingest_state: InsertOptional<string>;
}
@@ -0,0 +1,12 @@
// 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 RoadtripDayBoundariesTable {
trip_id: number;
day_number: number;
from_assignment_id: number;
to_assignment_id: InsertOptional<number | null>;
fraction: number;
}
@@ -0,0 +1,11 @@
// 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 RoadtripDayTracksTable {
day_id: InsertOptional<number>;
place_id: number;
stray_km: InsertOptional<number | null>;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,8 @@
// 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`.
export interface RoadtripPreferencesTable {
trip_id: number;
key: string;
value: string;
}
@@ -0,0 +1,14 @@
// 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 RoadtripViasTable {
id: InsertOptional<number>;
day_id: number;
after_order_index: number;
sequence: InsertOptional<number>;
lat: number;
lng: number;
created_at: InsertOptional<string | null>;
}
@@ -0,0 +1,15 @@
// 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 RouteUsageDailyTable {
day: string;
profile: string;
surface: string;
self_hosted: number;
requests: InsertOptional<number>;
waypoints: InsertOptional<number>;
km: InsertOptional<number>;
failed: InsertOptional<number>;
}
@@ -0,0 +1,9 @@
// 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 SchemaVersionTable {
id: InsertOptional<number>;
version: number;
}
@@ -0,0 +1,7 @@
// 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`.
export interface SchoolHolidayCountriesTable {
code: string;
name: string;
}

Some files were not shown because too many files have changed in this diff Show More