Method: Umlaut::Install#database_yml_hints

Defined in:
lib/generators/umlaut/install_generator.rb

#database_yml_hintsObject



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/generators/umlaut/install_generator.rb', line 31

def database_yml_hints
  guarded(:database_yml_hints) do
    insert_into_file("config/database.yml", :before => /^(\s*)development:/) do                     
      <<-eos
#
# UMLAUT: mysql db with mysql2 adapter strongly recommended for Umlaut, in both 
# production and development. sqlite3 has unclear semantics under threaded 
# concurrency which umlaut uses, and in many cases simply does not work. 
#
# A higher pool size than ordinary is recommended because of umlaut's
# use of concurrency. Perhaps as large as the number of services
# you have configured to run in the same wave, plus another few. 
#
# development:
#   adapter: mysql2
#   host: 
#   username:
#   password:
#   database:
#   pool: 15 

      eos
    end
    append_to_file("config/database.yml") do
      <<-eos
      
#
# UMLAUT: for the 'search' functions (A-Z title lookup) to work, you need
# a direct database connection to the SFX database, under 'sfx_db' key. 
# You should manually set up a new read-only MySQL account in the SFX db
# for this purpose, rather than use one of the full-access existing SFX
# mysql accounts. 
#
#sfx_db:
#  adapter: mysql2
#  host: my_sfx_host.u.edu
#  port: 3310 # 3310 is defualt SFX embedded mysql port
#  database: sfxlcl41 # or other sfx instance db
#  username:
#  password:
#  pool: 5
#  encoding: utf8
# 
      eos
    end
  end
end