Changeset 148 for trunk/grails-app


Ignore:
Timestamp:
Oct 9, 2009, 9:21:12 AM (15 years ago)
Author:
gav
Message:

Update DataSource?.groovy to include MySQL settings and comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/DataSource.groovy

    r81 r148  
    11dataSource {
    2         pooled = true
    3         driverClassName = "org.hsqldb.jdbcDriver"
    4         username = "sa"
    5         password = ""
     2    pooled = true
     3    /** HSQLDB  */
     4    driverClassName = "org.hsqldb.jdbcDriver"
     5    username = "sa"
     6    password = ""
     7    /** MySQL */
     8//     driverClassName = "com.mysql.jdbc.Driver"
     9//     username = "gnumimsadmin"
     10//     password = "gnumimsadmin"
    611}
    712hibernate {
     
    1116}
    1217
    13 //environment specific settings
    14 //create-drop:  drop tables and data between sessions, then insert from Bootstrap.
    15 //create:       drop data between sessions, can't explain the rest.
    16 //update:       keep data, update tables as required, keeps inserting from BootStrap.
     18// Environment specific settings.
     19// create-drop:  drop tables and data between sessions, then call Bootstrap.
     20// create:        drop data between sessions, can't explain the rest of the behaviour.
     21// update:       keep data, update tables as required, then call BootStrap.
    1722environments {
    18         development {
    19                 dataSource {
    20                         dbCreate = "create-drop" // one of 'create', 'create-drop','update'
    21                         url = "jdbc:hsqldb:mem:devDB"
    22                 }
    23         }
    24         test {
    25                 dataSource {
    26                         dbCreate = "update"
    27                         url = "jdbc:hsqldb:mem:testDb"
    28                 }
    29         }
    30         production {
    31                 dataSource {
    32                         //Delete dbCreate line after setup!
     23    development {
     24        dataSource {
     25            /** HSQLDB - In memory */
    3326            dbCreate = "create-drop"
    34                         //url = "jdbc:hsqldb:file:prodDb;shutdown=true"
    3527            url = "jdbc:hsqldb:mem:devDB"
    36                 }
    37         }
     28            /** MySQL */
     29//             dbCreate = "create-drop"
     30//             url = "jdbc:mysql://host:3306/gnumims_dev"
     31        }
     32    }
     33    test {
     34        dataSource {
     35            /** HSQLDB - In memory */
     36            dbCreate = "update"
     37            url = "jdbc:hsqldb:mem:devDb"
     38            /** MySQL */
     39//             dbCreate = "update"
     40//             url = "jdbc:mysql://host:3306/gnumims_test"
     41        }
     42    }
     43    production {
     44        dataSource {
     45            /** HSQLDB - In memory */
     46            //Delete dbCreate line after setup!
     47            dbCreate = "create-drop"
     48            url = "jdbc:hsqldb:mem:devDB"
     49            /** HSQLDB - In file */
     50//             dbCreate = "update"
     51//             url = "jdbc:hsqldb:file:prodDb;shutdown=true"
     52            /** MySQL */
     53//             dbCreate = "update"
     54//             url = "jdbc:mysql://host:3306/gnumims_prod"
     55        }
     56    }
    3857}
Note: See TracChangeset for help on using the changeset viewer.