- health schema: vaccinations, body_measurements, workouts, nutrition_daily, sleep (generated hours), medications, hair_progress, appointments - migration with updated_at triggers; grants to personal_app only - /trackers/health overview with add/edit/delete, owner-gated (404 otherwise), noindex + private no-store, hidden from listings for non-owners - owner-only JSON/CSV import endpoint and scripts/health-import.ts
32 lines
829 B
TypeScript
Executable File
32 lines
829 B
TypeScript
Executable File
import { defineConfig } from 'drizzle-kit';
|
|
|
|
// Drizzle owns the core schemas only. Deliberately excluded:
|
|
// - lists: runtime tables created through meta.create_list() (owned by personal_ddl)
|
|
// - legacy: pre-reorg tables kept read-only for rollback
|
|
// - energy: owned by ned-collector
|
|
// - hardware: not modelled yet
|
|
// Migrations run as the schema owner (`personal`), never as the app role.
|
|
export default defineConfig({
|
|
dialect: 'postgresql',
|
|
schema: './src/lib/server/db/schema/index.ts',
|
|
out: './drizzle',
|
|
schemaFilter: [
|
|
'auth',
|
|
'money',
|
|
'house',
|
|
'ref',
|
|
'games',
|
|
'cs',
|
|
'animaldex',
|
|
'site',
|
|
'meta',
|
|
'health'
|
|
],
|
|
migrations: { schema: 'drizzle', table: '__drizzle_migrations' },
|
|
verbose: true,
|
|
strict: true,
|
|
dbCredentials: {
|
|
url: (process.env.DB_MIGRATE_URL || process.env.DB_URL)!
|
|
}
|
|
});
|