1 | dataSource { |
---|
2 | // Open separate connections to database for every request or pool connections. |
---|
3 | pooled = true |
---|
4 | } |
---|
5 | hibernate { |
---|
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 | |
---|
17 | // Environment specific settings. |
---|
18 | environments { |
---|
19 | development { |
---|
20 | dataSource { |
---|
21 | /** HSQLDB - In memory */ |
---|
22 | driverClassName = "org.hsqldb.jdbcDriver" |
---|
23 | username = "sa" |
---|
24 | password = "" |
---|
25 | dbCreate = "create-drop" |
---|
26 | url = "jdbc:hsqldb:mem:devDb" |
---|
27 | /** MySQL */ |
---|
28 | // driverClassName = "com.mysql.jdbc.Driver" |
---|
29 | // username = "gnumimsadmin" |
---|
30 | // password = "gnumimsadmin" |
---|
31 | // dbCreate = "create-drop" |
---|
32 | // url = "jdbc:mysql://host:3306/gnumims_dev?autoReconnect=true&sessionVariables=storage_engine=InnoDB" |
---|
33 | } |
---|
34 | } |
---|
35 | test { |
---|
36 | dataSource { |
---|
37 | /** HSQLDB - In memory */ |
---|
38 | driverClassName = "org.hsqldb.jdbcDriver" |
---|
39 | username = "sa" |
---|
40 | password = "" |
---|
41 | dbCreate = "update" |
---|
42 | url = "jdbc:hsqldb:mem:devDb" |
---|
43 | /** MySQL */ |
---|
44 | // driverClassName = "com.mysql.jdbc.Driver" |
---|
45 | // username = "gnumimsadmin" |
---|
46 | // password = "gnumimsadmin" |
---|
47 | // dbCreate = "update" |
---|
48 | // url = "jdbc:mysql://host:3306/gnumims_test?autoReconnect=true&sessionVariables=storage_engine=InnoDB" |
---|
49 | } |
---|
50 | } |
---|
51 | production { |
---|
52 | dataSource { |
---|
53 | /* Delete dbCreate line after setup! */ |
---|
54 | /** HSQLDB - In memory */ |
---|
55 | // driverClassName = "org.hsqldb.jdbcDriver" |
---|
56 | // username = "sa" |
---|
57 | // password = "" |
---|
58 | // dbCreate = "create-drop" |
---|
59 | // url = "jdbc:hsqldb:mem:devDb" |
---|
60 | /** HSQLDB - In file */ |
---|
61 | // driverClassName = "org.hsqldb.jdbcDriver" |
---|
62 | // username = "sa" |
---|
63 | // password = "" |
---|
64 | // dbCreate = "update" |
---|
65 | // url = "jdbc:hsqldb:file:prodDb;shutdown=true" |
---|
66 | /** MSSQL */ |
---|
67 | //For more info see the docs that you downloaded with the driver. |
---|
68 | // dialect = org.hibernate.dialect.SQLServerDialect // Useful with `grails schema-export` |
---|
69 | // driverClassName = "com.microsoft.sqlserver.jdbc.SQLServerDriver" |
---|
70 | // username = "gnumimsadmin" |
---|
71 | // password = "gnumimsadmin" |
---|
72 | // dbCreate = "update" |
---|
73 | // url = "jdbc:sqlserver://gnumimssql01:1433;databaseName=gnumims_prod" |
---|
74 | /** MySQL */ |
---|
75 | driverClassName = "com.mysql.jdbc.Driver" |
---|
76 | username = "gnumimsadmin" |
---|
77 | password = "gnumimsadmin" |
---|
78 | dbCreate = "update" |
---|
79 | url = "jdbc:mysql://gnumimssql01:3306/gnumims_prod?autoReconnect=true&sessionVariables=storage_engine=InnoDB" |
---|
80 | } |
---|
81 | |
---|
82 | } |
---|
83 | } |
---|