db: ignore _litestream tables when validating (#2843)

This commit is contained in:
Kristoffer Dalby
2025-11-01 08:08:22 +01:00
committed by GitHub
parent ddbd3e14ba
commit 456a5d5cce
5 changed files with 35 additions and 5 deletions

View File

@@ -982,7 +982,17 @@ AND auth_key_id NOT IN (
ctx, cancel := context.WithTimeout(context.Background(), contextTimeoutSecs*time.Second)
defer cancel()
if err := squibble.Validate(ctx, sqlConn, dbSchema); err != nil {
opts := squibble.DigestOptions{
IgnoreTables: []string{
// Litestream tables, these are inserted by
// litestream and not part of our schema
// https://litestream.io/how-it-works
"_litestream_lock",
"_litestream_seq",
},
}
if err := squibble.Validate(ctx, sqlConn, dbSchema, &opts); err != nil {
return nil, fmt.Errorf("validating schema: %w", err)
}
}