You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Core, Arango] Database Migration: Add Repository Type Field to Database Schema #1516
As a database administrator, I want to add a 'type' field to all existing repository documents and ensure new repositories have this field so that the system can distinguish between Globus and metadata-only repositories.
Migration Script Example
// Migration: add_repo_type_field.jsdb._query(` FOR repo IN repo FILTER \!HAS(repo, 'type') UPDATE repo WITH { type: 'globus' } IN repo RETURN NEW`);// ValidationconstreposWithoutType=db._query(` FOR repo IN repo FILTER \!HAS(repo, 'type') RETURN repo`).toArray();if(reposWithoutType.length>0){thrownewError(`Migration failed: ${reposWithoutType.length} repos still missing type field`);}
Rollback Script
// Rollback: remove_repo_type_field.jsdb._query(` FOR repo IN repo UPDATE repo WITH { type: null } IN repo OPTIONS { keepNull: false } RETURN NEW`);
Acceptance Criteria
Create migration script to add 'type' field to existing repository documents
Set default value of 'globus' for all existing repositories
Ensure migration is idempotent (can be run multiple times safely)
Create rollback script to remove type field if needed
Validate that all repositories have a type field after migration
Update any database indexes that might be affected
Test migration on a copy of production data
Document migration procedure and rollback steps
Resources
Engineering Design Document: spec.md - Data Model Impact section
changed the title [-]Database Migration: Add Repository Type Field to Database Schema[/-][+][Core, Arango] Database Migration: Add Repository Type Field to Database Schema[/+]on Jul 8, 2025
Activity
[-]Database Migration: Add Repository Type Field to Database Schema[/-][+][Core, Arango] Database Migration: Add Repository Type Field to Database Schema[/+]