Files
Cites_Plugins/src/main
Antone Barbaud bcba8363c9 fix: restore visibility arg on /core team create + auto-migrate leader_id
/core team create now takes [visibility] [leader] (both optional,
positional in this order). Variants:
- /core team create N T C                  → PRIVATE, leaderless
- /core team create N T C PUBLIC           → PUBLIC, leaderless
- /core team create N T C PRIVATE Alice    → PRIVATE, Alice as leader
- /core team create N T C PUBLIC Alice     → PUBLIC, Alice as leader

Auto-migration for pre-existing SQLite databases:
SqliteTeamRepository.ensureSchema() now checks pragma_table_info for the
leader_id column. If it still has the NOT NULL constraint from an older
schema, it recreates the table (in a transaction) with leader_id nullable
and copies the rows over. Required because CREATE TABLE IF NOT EXISTS
skips the alteration on existing tables, so production databases were
crashing with SQLITE_CONSTRAINT_NOTNULL when an admin tried to create a
leaderless team.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 15:28:48 +02:00
..