mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(database): sqlite disable foreign key check (#229)
This commit is contained in:
parent
1a4f3cf55d
commit
d3aabffcfa
1 changed files with 3 additions and 3 deletions
|
@ -36,9 +36,9 @@ func (db *DB) openSQLite() error {
|
||||||
// Enable foreign key checks. For historical reasons, SQLite does not check
|
// Enable foreign key checks. For historical reasons, SQLite does not check
|
||||||
// foreign key constraints by default. There's some overhead on inserts to
|
// foreign key constraints by default. There's some overhead on inserts to
|
||||||
// verify foreign key integrity, but it's definitely worth it.
|
// verify foreign key integrity, but it's definitely worth it.
|
||||||
if _, err = db.handler.Exec(`PRAGMA foreign_keys = ON;`); err != nil {
|
//if _, err = db.handler.Exec(`PRAGMA foreign_keys = ON;`); err != nil {
|
||||||
return fmt.Errorf("foreign keys pragma: %w", err)
|
// return fmt.Errorf("foreign keys pragma: %w", err)
|
||||||
}
|
//}
|
||||||
|
|
||||||
// migrate db
|
// migrate db
|
||||||
if err = db.migrateSQLite(); err != nil {
|
if err = db.migrateSQLite(); err != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue