Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@
},
{
"includes": [
"src/shared/db/migrations/schema.ts",
"src/ui/templates/public/reservations.tsx"
],
"linter": {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/db/attendees/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import type { InValue } from "@libsql/client";
import { executeBatch, queryAll } from "#shared/db/client.ts";
import { ticketCountSumExpr } from "#shared/db/migrations/schema.ts";
import { ticketCountSumExpr } from "#shared/db/migrations/schema/listing-aggregates.ts";

type DeleteAttendeeOptions = { releaseBookings?: boolean };
type ListingContribution = {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/db/listings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import {
TICKET_COUNTS_PREDICATE,
ticketCountPredicateFor,
ticketCountSumExpr,
} from "#shared/db/migrations/schema.ts";
} from "#shared/db/migrations/schema/listing-aggregates.ts";
import { nameMapByIds } from "#shared/db/query.ts";
import { settings } from "#shared/db/settings.ts";
import { clearItemEdgesStatement } from "#shared/db/site-page-items.ts";
Expand Down
14 changes: 5 additions & 9 deletions src/shared/db/migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,12 @@ import processedPaymentsPaymentReferenceMigration from "./migrations/2026-07-07_
import listingAttributesMigration from "./migrations/2026-07-09_listing_attributes.ts";
import processedPaymentsAttendeeIndexMigration from "./migrations/2026-07-10_processed_payments_attendee_index.ts";
import { repairLegacyRenames } from "./migrations/rename-utils.ts";
import { SCHEMA, SCHEMA_HASH } from "./migrations/schema/index.ts";
import { TRIGGERS } from "./migrations/schema/triggers.ts";
import {
LATEST_UPDATE,
SCHEMA,
SCHEMA_HASH,
SCHEMA_MIGRATIONS_TABLE,
TRIGGERS,
} from "./migrations/schema.ts";
} from "./migrations/schema/version.ts";
import {
applySchemaChanges,
backfillAnswerAggregates,
Expand All @@ -128,11 +127,8 @@ import {
import type { Migration, MigrationContext } from "./migrations/types.ts";
import { additive, verifyRequirement } from "./migrations/verify.ts";

export {
LATEST_UPDATE,
SCHEMA_HASH,
SCHEMA_TABLE_NAMES,
} from "./migrations/schema.ts";
export { SCHEMA_HASH, SCHEMA_TABLE_NAMES } from "./migrations/schema/index.ts";
export { LATEST_UPDATE } from "./migrations/schema/version.ts";
export type { Migration, SchemaRequirement } from "./migrations/types.ts";

// ─── Helpers ────────────────────────────────────────────────────
Expand Down
2 changes: 1 addition & 1 deletion src/shared/db/migrations/booking-slot-index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SCHEMA } from "./schema.ts";
import { SCHEMA } from "./schema/index.ts";
import type { MigrationContext, SchemaRequirement } from "./types.ts";

/** The unique booking-slot index on `listing_attendees`. Widening it (adding a
Expand Down
11 changes: 4 additions & 7 deletions src/shared/db/migrations/schema-sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ import {
withTransaction,
} from "#shared/db/client.ts";
import { logDebug } from "#shared/logger.ts";
import { APP_SCHEMA, SCHEMA } from "./schema/index.ts";
import {
APP_SCHEMA,
type Column,
type Index,
SCHEMA,
type Table,
TICKET_COUNTS_PREDICATE,
TRIGGERS,
ticketCountPredicateFor,
} from "./schema.ts";
} from "./schema/listing-aggregates.ts";
import { TRIGGERS } from "./schema/triggers.ts";
import type { Column, Index, Table } from "./schema/types.ts";
import {
assertColumnsPresent,
assertLiveTableColumns,
Expand Down
Loading