title: What is the correct path to my database when I deploy heroku?
body: <p>I have created a table with SQLAlchemy inside a flask application in this application I implemented a python code to query data in an SQLite database.</p>
  <pre><code>database = r&quot;C:\\Users\Stuffs\\Flask\\users.db&quot;
  
  def create_connection(db_file):
  
      conn = None
      try:
          conn = sqlite3.connect(db_file)
      except Error as e:
          print(e)
  
      return conn
  
  
  def insert_value(conn, column, value):
      cur = conn.cursor()
      cur.execute(&quot; UPDATE users SET %s = %s WHERE id=1;&quot; %(column, value))
  
  def users_insert(column, value):
  
      # create a database connection
      conn = create_connection(database)
      with conn:
          insert_value(conn, column, value)
  </code></pre>
  <p>On the server side I have a python routine that analyzes the occurrence of an event and when it happens the value of one of the database columns is modified.</p>
  <ul>
  <li>Python code on serve side.</li>
  </ul>
  <pre><code>if len(classe)&gt;=2:
       i += 1
       users_insert(&quot;value_xbr&quot;, str(i))
  
  </code></pre>
  <p>About my database I follow videos on youtube where the programmer creates the database with sqlite3 and sqlalchemy, when deploying heroku he gets the link <code>'postgres://blabla....bla'</code> and replaces it with the path he had before.</p>
  <p>On my local host the project works perfectly. However, when I deployed it to heroku I caught some errors. To deploy on heroku I change the path of the database located on the local host to link to the development database on Heroku.</p>
  <p>My problem is just that, what is the correct path to my database when I deploy heroku?</p>
  <p>I would also like to know if there is a better way to do this code, i.e. to change the value of a certain column in the database when a specific event occurs that will be evaluated on the server side.</p>