title: iPhone SQLite File management
body: <p>I'm developing an application and I'm using SQLite as my database storage.
  I want to add and update the sqlite database throughout my application duration, so i copied it to the documents directory so i can do all kinds of stuff with my database except only selecting from it.</p>
  
  <p>But since I'm developing "time", my database changes frequently (the database architecture is made by another developer) through the process</p>
  
  <p>On the iPhone i'm checking </p>
  
  <ol>
  <li>if the database exists in the documents directory</li>
  <li>(if not) copy it to it.</li>
  <li>use that database</li>
  </ol>
  
  <p>but when i want to update my database ( i made in a separate sqlite manager ) it fails through the process of copying the newer version because i'm only checking if the database exists. </p>
  
  <p>Does anyone of you guys experienced the same kind of problem ? and what did you do to pass this kind of problem ..</p>
  
  <p>my only idea was to create a settings table and hold a row that check's for a version number of the database..</p>
  
  <p>Is there also a way to edit the sql file from the documents directory in any sqlite management tool ?</p>
  
  <p>or are there better solutions ?</p>