Recommand · October 22, 2021 0

Sqlite3 – Python – Not Updating

Closed. This question needs details or clarity. It is not currently accepting answers.


Want to improve this question? Add details and clarify the problem by editing this post.

Closed 1 hour ago.

Improve this question

I created a table in sqlite3 – in Flask,

Table - Log
    accessed_time = Column(DateTime, default=datetime.datetime.now())
    user_id = Column(Integer, primary_key=True)

When, I run flask, the database is created. I call this table(Log) to update the accessed_time when the user enters in a place.

Calling like – log(user_id=10)

But, after the first call, the accessed_time is not updating to the new time instead it stays same.

How to solve this?, thanks