PostgreSQL table definitions for Tinyland business content and booking state.
All exported tables are tenant-scoped with tenant_id uuid NOT NULL; consuming
apps enforce tenant isolation through RLS and tenant-scoped queries.
This package is intentionally separate from @tummycrypt/tinyland-auth-pg.
Auth storage remains in the auth package. Business profile, services, hours,
practitioners, clients, bookings, blocks, overrides, and checkout reservations
live here so reusable scheduling adapters can depend on explicit business
schema authority without pulling in auth storage.
pnpm add @tummycrypt/tinyland-business-pg drizzle-ormimport * as businessPg from '@tummycrypt/tinyland-business-pg';
import * as contentSchema from '@tummycrypt/tinyland-business-pg/content-schema';
import * as bookingSchema from '@tummycrypt/tinyland-business-pg/booking-schema';@tummycrypt/scheduling-kit can consume this package through explicit schema
injection:
import { createHomegrownAdapter } from '@tummycrypt/scheduling-kit/adapters/homegrown';
import * as bookingSchema from '@tummycrypt/tinyland-business-pg/booking-schema';
import * as contentSchema from '@tummycrypt/tinyland-business-pg/content-schema';
const adapter = createHomegrownAdapter({
databaseUrl: process.env.DATABASE_URL,
schemas: {
booking: bookingSchema,
content: contentSchema,
},
});That is a package boundary, not Bazel remote execution. Bazel builds this package artifact and makes it cacheable; remote execution remains a separate infrastructure authority.
Content tables:
business_profileservicesbusiness_hoursreviewspractitioners
Booking tables:
clientsbookingstime_blocksbusiness_hours_overridesslot_reservations
pnpm install --frozen-lockfile
pnpm typecheck
pnpm test:unit
pnpm build
pnpm check:package
bazel build //:pkg
bazel test //:test