Feat v0.9.4 package adoption + roles
All checks were successful
CI/CD / detect-changes (pull_request) Successful in 21s
CI/CD / test-frontend (pull_request) Has been skipped
CI/CD / test-runners (pull_request) Has been skipped
CI/CD / e2e-smoke (pull_request) Has been skipped
CI/CD / test-sqlite (pull_request) Successful in 2m52s
CI/CD / test-go-pg (pull_request) Successful in 3m6s
CI/CD / build-and-deploy (pull_request) Successful in 1m41s
All checks were successful
CI/CD / detect-changes (pull_request) Successful in 21s
CI/CD / test-frontend (pull_request) Has been skipped
CI/CD / test-runners (pull_request) Has been skipped
CI/CD / e2e-smoke (pull_request) Has been skipped
CI/CD / test-sqlite (pull_request) Successful in 2m52s
CI/CD / test-go-pg (pull_request) Successful in 3m6s
CI/CD / build-and-deploy (pull_request) Successful in 1m41s
Packages can declare `adoptable: true` in their manifest. When a team adopts an adoptable package, a team-scoped copy is created that references the original via `adopted_from` (shared assets, no disk duplication). The package's `requires_roles` auto-populate into a new `team_role_catalog` table so team admins know which roles to assign. Migration 017: adoptable/adopted_from columns on packages, team_role_catalog table. 4 new endpoints (adopt, list adoptable, unadopt, role catalog). AdoptTeamWorkflow deprecated. 11 new tests, all passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
21
server/database/migrations/sqlite/017_package_adoption.sql
Normal file
21
server/database/migrations/sqlite/017_package_adoption.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
-- ==========================================
|
||||
-- Armature — 017 Package Adoption + Role Catalog (SQLite)
|
||||
-- ==========================================
|
||||
|
||||
-- Add adoptable flag and adoption lineage to packages
|
||||
ALTER TABLE packages ADD COLUMN adoptable INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE packages ADD COLUMN adopted_from TEXT;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_packages_adoptable ON packages(adoptable);
|
||||
|
||||
-- Team role catalog: known roles sourced from adopted packages
|
||||
CREATE TABLE IF NOT EXISTS team_role_catalog (
|
||||
id TEXT PRIMARY KEY,
|
||||
team_id TEXT NOT NULL REFERENCES teams(id) ON DELETE CASCADE,
|
||||
role TEXT NOT NULL,
|
||||
source_package_id TEXT REFERENCES packages(id) ON DELETE SET NULL,
|
||||
created_at TEXT DEFAULT (datetime('now')),
|
||||
UNIQUE(team_id, role)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_team_role_catalog_team ON team_role_catalog(team_id);
|
||||
Reference in New Issue
Block a user