diff --git a/basicswap/db_upgrades.py b/basicswap/db_upgrades.py index 192c586..16da49a 100644 --- a/basicswap/db_upgrades.py +++ b/basicswap/db_upgrades.py @@ -427,24 +427,7 @@ def upgradeDatabase(self, db_version): ) elif current_version == 26: db_version += 1 - # First add the column - cursor.execute( - "ALTER TABLE offers ADD COLUMN auto_accept_type INTEGER NOT NULL DEFAULT 0" - ) - - # Then update existing rows based on auto_accept_bids - cursor.execute( - """ - UPDATE offers - SET auto_accept_type = CASE - WHEN auto_accept_bids = 1 THEN 1 - ELSE 0 - END - WHERE auto_accept_type IS NULL - """ - ) - - self.commitDB() + cursor.execute("ALTER TABLE offers ADD COLUMN auto_accept_type INTEGER") if current_version != db_version: self.db_version = db_version self.setIntKV("db_version", db_version, cursor)