title: Flask-SQLAlchemy - When are the tables/databases created and destroyed?
body: <p>I am a little confused with the topic alluded to in the title. </p>
  
  <p>So, when a Flask app is started, does the SQLAlchemy search the<code>SQLALCHEMY_DATABASE_URI</code> for the correct, in my case, MySQL database. Then, does it create the tables if they do not exist already?</p>
  
  <p>What if the database that is programmed into the<code>SQLALCHEMY_DATABASE_URI</code> variable in the <code>config.py</code> file does not exist?</p>
  
  <p>What if that database exists, and only a few of the tables exist (There are more tables coded into the SQLAlchemy code than exist in the actual MySQL database)? Does it erase those tables and then create new tables with the current specs? </p>
  
  <p>And what if those tables do all exist? Do they get erased and re-created?</p>
  
  <p>I am trying to understand how the entire process works so that I (1) Don't lose database information when changes are made to the schema, and (2) can write the necessary code to completely manage how and when the SQLAlchemy talks to the actual Database.</p>