python - Database connection setup broken after updating to Peewee 2.6 from 2.4 -
i want upgrade pewee v2.4.7 v2.6.3 in order use get_or_create method. however, after updating connection setup broken. i used following superclass enable foreign key contraints sqlite (2.6.3): class sqlitefkdatabase(sqlitedatabase): def initialize_connection(self): self.execute_sql('pragma foreign_keys=on;') return self ... using following connection setup code: db = sqlitefkdatabase(none) init_db(path_to_db) def init_db(path_to_db): ...