#1705·corsair

demo/testing Drizzle schema is missing corsair_permissions

Author: UV921Created Sep 9, 2026Updated Sep 11, 2026
Labelsbug

Steps to reproduce

  1. Clone/setup the repository and go to demo/testing.

  2. Initialize the SQLite database with: pnpm db:push

  3. Run the existing manual test script with: pnpm test:manual

  4. When a permission-requiring operation is reached, Corsair queries the corsair_permissions table.

  5. SQLite throws:

    SqliteError: no such table: corsair_permissions

demo/testing/src/db/schema.ts currently does not define corsair_permissions, so db:push never creates it.

Expected Behavior

After running pnpm db:push, the testing database should contain all tables required by the current Corsair runtime.

The permission flow should be able to query corsair_permissions instead of failing with:

SqliteError: no such table: corsair_permissions

Corsair version

0.1.127

Environment details

bash
OS: macOS
Node: v22.21.0
Package manager: pnpm 10.20.0
Database: SQLite / better-sqlite3

What part of Corsair is affected?

Other

Configuration (if relevant)

typescript

Anything else

I traced the schema history and found that corsair_permissions existed in the previous testing schema, but its definition is missing from the current demo/testing/src/db/schema.ts.

The current Corsair runtime still expects the corsair_permissions table.

I would be happy to work on aligning the demo/testing Drizzle schema and migration with the current permission model if this approach looks correct.