source: branches/features/purchaseOrders/grails-app/conf/DataSource.groovy

Last change on this file was 946, checked in by gav, 13 years ago

Svn merge -r942:r945 trunk/ into branches/features/purchaseOrders.
This brings the purchaseOrder branch fully up to date.

File size: 2.1 KB
Line 
1dataSource {
2    // Open separate connections to database for every request or pool connections.
3    pooled = true
4}
5hibernate {
6    cache.use_second_level_cache=true
7    cache.use_query_cache=true
8    cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider'
9}
10
11// dbCreate options.
12// create-drop: Drop and re-create the database tables on restart. Deletes existing data.
13// create:       Create the database if it doesn't exist, but don't modify it if it does. Deletes existing data.
14// update:     Create the database if it doesn't exist, and modify it if it does exist. Keep data.
15// If nothing specified then do nothing to database schema.
16
17def appNameLowerCase = appName.toLowerCase()
18
19// Environment specific settings.
20// All production config is in external config.
21environments {
22    development {
23        dataSource {
24            /** HSQLDB - In memory */
25            driverClassName = "org.hsqldb.jdbcDriver"
26            username = "sa"
27            password = ""
28            dbCreate = "create-drop"
29            url = "jdbc:hsqldb:mem:devDb"
30            /** MySQL */
31//             dialect = org.hibernate.dialect.MySQL5InnoDBDialect
32//             driverClassName = "com.mysql.jdbc.Driver"
33//             username = "${appNameLowerCase}admin"
34//             password = "${appNameLowerCase}admin"
35//             dbCreate = "create-drop"
36//             url = "jdbc:mysql://host:3306/${appNameLowerCase}_dev?autoReconnect=true&sessionVariables=storage_engine=InnoDB"
37        }
38    }
39    test {
40        dataSource {
41            /** HSQLDB - In memory */
42            driverClassName = "org.hsqldb.jdbcDriver"
43            username = "sa"
44            password = ""
45            dbCreate = "update"
46            url = "jdbc:hsqldb:mem:devDb"
47            /** MySQL */
48//             dialect = org.hibernate.dialect.MySQL5InnoDBDialect
49//             driverClassName = "com.mysql.jdbc.Driver"
50//             username = "${appNameLowerCase}admin"
51//             password = "${appNameLowerCase}admin"
52//             dbCreate = "update"
53//             url = "jdbc:mysql://host:3306/${appNameLowerCase}_test?autoReconnect=true&sessionVariables=storage_engine=InnoDB"
54        }
55    }
56}
Note: See TracBrowser for help on using the repository browser.