source: trunk/grails-app/conf/DataSource.groovy @ 897

Last change on this file since 897 was 878, checked in by gav, 14 years ago

Add MySQL5InnoDBDialect to DataSource.groovy, helps with schema generation and checking.

File size: 3.4 KB
RevLine 
[55]1dataSource {
[171]2    // Open separate connections to database for every request or pool connections.
[148]3    pooled = true
[55]4}
5hibernate {
6    cache.use_second_level_cache=true
[178]7    cache.use_query_cache=true
[449]8    cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider'
[55]9}
[81]10
[174]11// dbCreate options.
12// create-drop: Drop and re-create the database tables on restart. Deletes existing data.
[149]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.
[174]15// If nothing specified then do nothing to database schema.
16
17// Environment specific settings.
[55]18environments {
[148]19    development {
20        dataSource {
21            /** HSQLDB - In memory */
[149]22            driverClassName = "org.hsqldb.jdbcDriver"
23            username = "sa"
24            password = ""
[81]25            dbCreate = "create-drop"
[504]26            url = "jdbc:hsqldb:mem:devDb"
[148]27            /** MySQL */
[878]28//             dialect = org.hibernate.dialect.MySQL5InnoDBDialect
[149]29//             driverClassName = "com.mysql.jdbc.Driver"
30//             username = "gnumimsadmin"
31//             password = "gnumimsadmin"
[148]32//             dbCreate = "create-drop"
[176]33//             url = "jdbc:mysql://host:3306/gnumims_dev?autoReconnect=true&sessionVariables=storage_engine=InnoDB"
[148]34        }
35    }
36    test {
37        dataSource {
38            /** HSQLDB - In memory */
[149]39            driverClassName = "org.hsqldb.jdbcDriver"
40            username = "sa"
41            password = ""
[148]42            dbCreate = "update"
43            url = "jdbc:hsqldb:mem:devDb"
44            /** MySQL */
[878]45//             dialect = org.hibernate.dialect.MySQL5InnoDBDialect
[149]46//             driverClassName = "com.mysql.jdbc.Driver"
47//             username = "gnumimsadmin"
48//             password = "gnumimsadmin"
[148]49//             dbCreate = "update"
[176]50//             url = "jdbc:mysql://host:3306/gnumims_test?autoReconnect=true&sessionVariables=storage_engine=InnoDB"
[148]51        }
52    }
53    production {
54        dataSource {
[149]55            /* Delete dbCreate line after setup! */
[148]56            /** HSQLDB - In memory */
[149]57//             driverClassName = "org.hsqldb.jdbcDriver"
58//             username = "sa"
59//             password = ""
60//             dbCreate = "create-drop"
[504]61//             url = "jdbc:hsqldb:mem:devDb"
[148]62            /** HSQLDB - In file */
[149]63//             driverClassName = "org.hsqldb.jdbcDriver"
64//             username = "sa"
65//             password = ""
[148]66//             dbCreate = "update"
67//             url = "jdbc:hsqldb:file:prodDb;shutdown=true"
[228]68            /** MSSQL */
69            //For more info see the docs that you downloaded with the driver.
[878]70//             dialect = org.hibernate.dialect.SQLServerDialect // MSSQL 2000+2005 Useful with `grails schema-export`
[228]71//             driverClassName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
72//             username = "gnumimsadmin"
73//             password = "gnumimsadmin"
74//             dbCreate = "update"
[259]75//             url = "jdbc:sqlserver://gnumimssql01:1433;databaseName=gnumims_prod"
[148]76            /** MySQL */
[878]77            dialect = org.hibernate.dialect.MySQL5InnoDBDialect
[149]78            driverClassName = "com.mysql.jdbc.Driver"
79            username = "gnumimsadmin"
80            password = "gnumimsadmin"
81            dbCreate = "update"
[176]82            url = "jdbc:mysql://gnumimssql01:3306/gnumims_prod?autoReconnect=true&sessionVariables=storage_engine=InnoDB"
[148]83        }
[228]84
[148]85    }
[55]86}
Note: See TracBrowser for help on using the repository browser.