Answer the question
In order to leave comments, you need to log in
Peewee - sqlite - new data is not added, but overwrites the previous ones. What am I missing?
when adding records, I use standard methods:
MyModel.create(**source_data)
or
MyModel.insert(source_data).execute()
Data is not added, but overwrites the previous ones.
Almost all settings are default.
Answer the question
In order to leave comments, you need to log in
Didn't work with Peewee specifically, but is .commit() done after data is entered? It seems like here, by analogy, for example with SQLAlchemy, when entering new data, you need to commit: docs.peewee-orm.com/en/latest/peewee/api.html#Data...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question