1 | dataSource { |
---|
2 | pooled = true |
---|
3 | driverClassName = "org.hsqldb.jdbcDriver" |
---|
4 | username = "sa" |
---|
5 | password = "" |
---|
6 | } |
---|
7 | hibernate { |
---|
8 | cache.use_second_level_cache=true |
---|
9 | cache.use_query_cache=true |
---|
10 | cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider' |
---|
11 | } |
---|
12 | // environment specific settings |
---|
13 | environments { |
---|
14 | development { |
---|
15 | dataSource { |
---|
16 | |
---|
17 | dbCreate = "update" |
---|
18 | username = "gscf" |
---|
19 | password = "dbnp" |
---|
20 | |
---|
21 | // PostgreSQL |
---|
22 | driverClassName = "org.postgresql.Driver" |
---|
23 | url = "jdbc:postgresql://localhost:5432/gscf" |
---|
24 | dialect = org.hibernate.dialect.PostgreSQLDialect |
---|
25 | |
---|
26 | /** |
---|
27 | dbCreate = "create-drop" // one of 'create', 'create-drop','update' |
---|
28 | url = "jdbc:hsqldb:mem:devDB" |
---|
29 | */ |
---|
30 | } |
---|
31 | } |
---|
32 | test { |
---|
33 | dataSource { |
---|
34 | dbCreate = "update" |
---|
35 | url = "jdbc:hsqldb:mem:testDb" |
---|
36 | } |
---|
37 | } |
---|
38 | production { |
---|
39 | dataSource { |
---|
40 | /* |
---|
41 | * when releasing a new stable to the live environment |
---|
42 | * you would probably comment out the dbCreate option |
---|
43 | * so hibernate won't try to update (which is does not |
---|
44 | * do so well) and you update the live database yourself |
---|
45 | * |
---|
46 | * @see http://grails.org/plugin/autobase |
---|
47 | * @see http://wiki.github.com/RobertFischer/autobase/example-usage |
---|
48 | */ |
---|
49 | dbCreate = "update" |
---|
50 | username = "gscf" |
---|
51 | password = "dbnp" |
---|
52 | |
---|
53 | // PostgreSQL |
---|
54 | driverClassName = "org.postgresql.Driver" |
---|
55 | url = "jdbc:postgresql://localhost:5432/gscf" |
---|
56 | dialect = org.hibernate.dialect.PostgreSQLDialect |
---|
57 | |
---|
58 | // MySQL |
---|
59 | //driverClassName = "com.mysql.jdbc.Driver" |
---|
60 | //url = "jdbc:mysql://localhost/gscf" |
---|
61 | //dialect = "org.hibernate.dialect.MySQL5InnoDBDialect" |
---|
62 | |
---|
63 | //In memory |
---|
64 | //url = "jdbc:hsqldb:file:prodDb;shutdown=true" |
---|
65 | } |
---|
66 | } |
---|
67 | } |
---|