> ## Documentation Index
> Fetch the complete documentation index at: https://docs.knowledgestack.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Design Decisions

> This page documents key architectural decisions in Knowledge Stack and explains why they matter for your experience.

## Dedicated Database Schema

Knowledge Stack uses a dedicated `knowledgestack` PostgreSQL schema rather than the default `public` schema. This decision provides several benefits:

1. **Clear separation** -- All Knowledge Stack tables are namespaced under `knowledgestack`, making it easy to identify them in a shared database environment
2. **Multi-schema readiness** -- If you need to run multiple Knowledge Stack instances on the same database server, the schema-based approach supports this without conflicts
3. **Reliable migrations** -- The dedicated schema avoids edge cases in PostgreSQL's migration tooling that can cause unnecessary and potentially disruptive schema changes when using the default `public` schema

### What This Means for You

* If you run custom SQL queries against the Knowledge Stack database, prefix table names with `knowledgestack.` (e.g., `knowledgestack.path_part`)
* Database backups and restores work the same way -- the schema is included automatically
* If you inspect the database, you will find all Knowledge Stack tables under the `knowledgestack` schema rather than `public`
