Files
website/drizzle.config.ts
Stan Runge b757269151
All checks were successful
Deploy production / deploy (push) Successful in 2m37s
music: self-hosted scrobbler (Spotify poller, Last.fm + streaming-history importers, /trackers/music, homepage listening card)
- music schema: artists/albums/tracks (+album art), plays with source + dedupe, now_playing,
  spotify_auth, import_state; plays_deduped view hides Last.fm scrobbles Spotify also has
- in-app Spotify poller (60s, leased) started from hooks init; no new role or env needed
- /api/spotify/connect + callback (owner only), /trackers/music public stats
- scripts: music-poll, music-import-lastfm (resumable), music-import-history
- deploy/music-collector: optional host timer with its own role
2026-10-24 15:57:40 +00:00

38 lines
897 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',
'books',
'tasks',
'groceries',
'home',
'cars',
'music'
],
migrations: { schema: 'drizzle', table: '__drizzle_migrations' },
verbose: true,
strict: true,
dbCredentials: {
url: (process.env.DB_MIGRATE_URL || process.env.DB_URL)!
}
});