feat: add brief concept party classification

This commit is contained in:
2026-08-14 14:44:58 +02:00
parent e333d3b634
commit d46a425401
17 changed files with 431 additions and 34 deletions
+4 -3
View File
@@ -33,7 +33,7 @@ suite('PostgreSQL migrations', () => {
const migrationsDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'migrations')
const firstRun: string[] = []
await runMigrations(testDatabaseUrl, migrationsDir, message => firstRun.push(message))
expect(firstRun.filter(message => message.startsWith('apply '))).toHaveLength(6)
expect(firstRun.filter(message => message.startsWith('apply '))).toHaveLength(7)
const client = new Client({ connectionString: testDatabaseUrl })
await client.connect()
@@ -42,15 +42,16 @@ suite('PostgreSQL migrations', () => {
expect(tableNames).toEqual(expect.arrayContaining([
'boards', 'levels', 'level_templates', 'level_template_versions', 'exhibits', 'folder_exhibits',
'document_exhibits', 'folder_memberships', 'exhibit_connections', 'metadata_fields', 'assets', 'schema_migrations',
'party_exhibits', 'person_parties', 'organization_parties', 'brief_concepts', 'level_briefs',
]))
expect(tableNames).not.toEqual(expect.arrayContaining(['cases', 'widgets', 'widget_relations', 'playthroughs']))
const ledger = await client.query<{ count: string }>('SELECT COUNT(*)::text AS count FROM osint.schema_migrations')
expect(ledger.rows[0].count).toBe('6')
expect(ledger.rows[0].count).toBe('7')
await client.end()
const secondRun: string[] = []
await runMigrations(testDatabaseUrl, migrationsDir, message => secondRun.push(message))
expect(secondRun.filter(message => message.startsWith('skip '))).toHaveLength(6)
expect(secondRun.filter(message => message.startsWith('skip '))).toHaveLength(7)
expect(secondRun.some(message => message.startsWith('apply '))).toBe(false)
})
})