title: Initial data for grails application
body: <p>I am developing a small grails application from a book and one of the steps it needs is to feed the database with initial data. When I do so using the <code>GroovyConsole</code>, the script executes but doesnt persist the data.</p>
  
  <p><code>DataSource.groovy</code> environment settings are as follows</p>
  
  <pre><code>development {
          dataSource {
              dbCreate = "update" // one of 'create', 'create-drop', 'update', 'validate', ''
              url = "jdbc:h2:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
          }
      }
  </code></pre>
  
  <p>When I run the script in console, <code>result</code> returns <code>NULL</code>. I have been using GGTS for the application but I have no idea how to persist initial data from GGTS so I ran the <code>grails console</code> command from the command prompt for this. Is this the right way? Is there a way to do it directly from GGTS?</p>
  
  <p>PS: I have seen this question <a href="https://stackoverflow.com/questions/2705412/seed-data-for-grails-application">Seed data for grails application</a> but it seems to be too advanced for where I am now and what I need. </p>
  
  <p>Thanks</p>