-
Notifications
You must be signed in to change notification settings - Fork 0
Database
Sasha Baranov edited this page Jun 12, 2026
·
1 revision
Aicraft stores chat history, web sessions, and link requests in a database. The database is always initialized — even when the web UI is disabled.
Zero setup. On first startup:
- Creates
plugins/Aicraft/aicraft.db - Runs migrations automatically
- Creates all required tables
database:
type: sqlite
sqlite-file: "aicraft.db"You never need to run SQL manually.
Create the database on your Postgres server first, then configure:
database:
type: postgres
postgres:
host: "localhost"
port: 5432
database: "aicraft"
username: "aicraft"
password: "your-password"Migrations run automatically on startup.
| Table | Purpose |
|---|---|
chats |
Chat sessions per player (with per-player chat number) |
chat_messages |
Messages (user, assistant, system) |
web_sessions |
Linked web UI sessions |
link_requests |
Pending /ailink verification codes |
schema_version |
Migration tracking |
For SQLite, stop the server (or ensure no writes) and copy plugins/Aicraft/aicraft.db. For Postgres, use your normal backup tooling.