Dev-only database setup for the local dashboard harness.
Plain mix ecto.migrate cannot stand up a fresh Scoria database: the core and
knowledge migration sets are interleaved by foreign-key dependencies and even
share a version number (20260511000300), tracked in separate
schema_migrations tables via the test-support migration helper.
Required order on a fresh DB:
- enable the
vectorextension (the knowledge hnsw index needs it) - core migrations UP TO (excluding)
create_semantic_cache_tables— createsai_traces/ai_spans/ai_workflow_runs, which the knowledge migration's FKs reference - knowledge migrations — creates
ai_retrieval_runs - the remaining core migration (
create_semantic_cache_tables), whose FK referencesai_retrieval_runs
This task lives under dev/ and is compiled only in :dev — it never ships
to Hex. Used by mix dev.setup and the Docker entrypoint.