feat: let one signup cover a party of spots

Capacity, mail, and the roster count each person in the group. Today's calendar shifts are a light wash on the yellow day, and the signup dialog scrolls inside its panel.
This commit is contained in:
blake committed 2026-10-28 12:08:00 -05:00
1 parent 1f451dc830
commit 63748d464a
18 files changed
+585 -68

No files matched your search

+10
View File
@@ -123,18 +123,28 @@ export async function applyMigrations(
}
const applied: string[] = [];
for (const file of pending) {
const relaxForeignKeys = file.sql.split('\n').some((line) => line.trim() === '-- foreign-keys: off');
const apply = db.transaction(() => {
db.exec(file.sql);
if (relaxForeignKeys) {
const broken = db.pragma('foreign_key_check');
if (Array.isArray(broken) && broken.length > 0) {
throw new Error('foreign key check failed');
}
}
db.prepare('INSERT INTO schema_migrations (name, checksum, applied_at) VALUES (?, ?, ?)').run(
file.name,
file.checksum,
options.now ?? nowUtc(),
);
});
if (relaxForeignKeys) db.pragma('foreign_keys = OFF');
try {
apply();
} catch (err) {
throw new MigrationError(`Startup aborted. Migration ${file.name} failed: ${messageOf(err)}`);
} finally {
if (relaxForeignKeys) db.pragma('foreign_keys = ON');
}
applied.push(file.name);
}