Voyager 3 schema: the slim catalog (migration 6000, the reset) and blocks (6100)
releases rebuilt without its text copies: poster_id, group_set_id, bytea keys, source smallint, edge, settled_at as the finish. posters by id, group_sets. blocks as the lease unit, ranges.block_id. fragments, range_blocks, release_final, the settler and the fragment merger gone; release_chunks, rule_counts and rule_samples keyed by block. Cold tables on CHUNK_TABLESPACE. Migration 6000 truncates the catalog and refuses without VOYAGER3_RESET=1. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
1a448f37f9
commit
346493b6c3
17 files changed
+527
-545
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { test } from '@japa/runner'
|
||||
import { SOURCES, sourceCode, sourceName } from '#lib/release/source'
|
||||
|
||||
test.group('release source codes', () => {
|
||||
test('names and codes map both ways; the codes are fixed', ({ assert }) => {
|
||||
assert.deepEqual(SOURCES, { subject: 1, post: 2, stem: 3, spot: 4, nzb: 5, album: 6 })
|
||||
for (const [name, code] of Object.entries(SOURCES)) {
|
||||
assert.equal(sourceCode(name), code)
|
||||
assert.equal(sourceName(code), name)
|
||||
assert.equal(sourceName(String(code)), name)
|
||||
}
|
||||
})
|
||||
|
||||
test('an unknown name throws, an unknown code reads as unknown', ({ assert }) => {
|
||||
assert.throws(() => sourceCode('subjekt'), /Unknown release source/)
|
||||
assert.equal(sourceName(99), 'unknown')
|
||||
assert.equal(sourceName(null), 'unknown')
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user