title: How to store/organize DDL script?
body: <p>First of all, I'm using MySQL on the cloud ( Amazon RDS ). My database definition script has statements to create views, triggers, stored procedures, users, grant permissions to users plus insert some data (e.g look-up tables ) etc. This script has 2000 lines of SQL code. I keep this script in just one file and I execute it using : mysql --user=myusername --password=mypassword  &lt;&lt; my.script.sql. This file is protected by SVN. </p>
  
  <p>The issue with having all the SQL code in one file is that it's difficult to see the SVN history for just one item ( say I want to see the SVN history for the table Task and the view TaskView ).... So my question is : how do people store such scripts ? Do professional people store each item ( table,view,stored procedure ) in its own file in a directory ? If so , one has to make a script that deploys all the mini SQL scripts in a folder ? Do people just make a script that looks for every .SQL file and dumps it on the DB ? Do people use various folders to organize such a script ? E.g one folder for views, one folder for tables, one folder for stored procedures ?</p>
  
  <p>Cheers !</p>