title: Flask Sqlalchemy how to not auto-update TIMSTAMP column when update a row
body: <p>I have a model:</p>
  
  <pre class="lang-py prettyprint-override"><code>class User(db.Model):
      id = db.Column(db.Integer, primary_key=True)
      name = db.Column(db.String, nullable=False)
      password = db.Column(db.String, nullable=False)
      created_time = db.Column(db.TIMESTAMP, nullable=False)
  </code></pre>
  
  <p>However, every time I updated <code>name</code> or <code>password</code>, the timestamp <code>created_time</code> would be updated, but I don't want <code>created_time</code> to be updated. </p>
  
  <pre class="lang-py prettyprint-override"><code># the way I update a user's info
  class UserController(Resource):
      def get(self):
          user = User.query.filter_by(id=1).first()  # a user had been created before
          user.name = "new_name"
          db.session.commit()  
         # as of here, not only `name` but also `created_time` will be update
  
  </code></pre>
  
  <p>How to stop <code>created_time</code> from auto-updating when updating a row?</p>
  
  <hr>
  
  <h3>Edit 1</h3>
  
  <p>To be more precise, I would like to know about the mechanism of <code>db.TIMESTAMP</code>, and more specifically, to resolve the issue that when I update other columns in a row <code>db.TIMESTAMP</code> column is also updated. </p>
  
  <p>I would instead want the value in <code>db.TIMESTAMP</code> column to be fixed at the time the row is created, and that value should never change regardless of how values in other columns change.</p>
  
  <p>P.S. To avoid misunderstanding, I know <code>TIMESTAMP</code> may not be the most appropriate type for <code>created_time</code> column, but the above code is only for illustrating purposes.</p>