This repository has been archived by the owner on Aug 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain-local.php
279 lines (140 loc) · 6.44 KB
/
main-local.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<?php
//Why: Share this software out to as many companies (or separate divisions within a company) that want to use it either for a paypal subscription ie. Remove
//'Subscription Free Privilege' from their individual 'Mdb#' role or 'Udb#' where # corresponds to the database number here.
//The Mdb# role is used for the manager of that specific company/division and the Udb# role is used for employees.
//All Mdb roles are linked to the 'support' role so change the support role 'makeup' if you want this to be applicable to all
//managers using the software. Use with caution since this role change will effect all databases.
//All Udb roles are linked to the 'employee' role so change the employee role 'makeup' if you want this to be applicable to all
//employees using this software. Use with caution since this role change will effect all databases.
//Shared Hosting Database Setup. Reserve the first database namely 'db' for the installer database where you will
//input users that will be allocated use of the other databases. Signup all users with their email and role and temporary password
//and assign either the Mdb role or Udb role to their username using the built in Role Based Access Control GUI (Graphical User Interface) user interface.
//This file works in conjunction with frontend/components/Utilities and any databases over and above the 10 created here must be matched by adjusting the
//code in frontend/components/Utilities so that the individual models used throughout the software via the getDb function use the
//correct database.
//
//Keep the database name consistent with the naming convention here. ie. db1 is used here therefore name your MySql database db1.
//Change the passwords here from '' to the specification required by your hosting provider. eg. One uppercase and minimum of 8 characters
//including a special character.
//Increase the number of databases here according to the number of MySql databases that you have manually created on the server using phpMyAdmin
//10 database have been created here under the premise that you will have 10 fellow companies or perhaps even 10 divisions within your
//company that will be responsible for their own jobs and cash collections.
//
return [
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=h2h_db',
//user name is normally 'yoursitename_co_uk_db'
'username' => 'root',
//password is the password that has been assigned under the above username
'password' => '',
'charset' => 'utf8',
'enableSchemaCache' => true,
'schemaCacheDuration' => 3600,
'schemaCache' => 'cache',
],
'db1' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=h2h_db1',
//user name is normally 'yoursitename_co_uk_db1'
'username' => 'root',
//password is the password that has been assigned under the above username
'password' => '',
'charset' => 'utf8',
'enableSchemaCache' => true,
'schemaCacheDuration' => 3600,
'schemaCache' => 'cache',
],
'db2' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=h2h_db2',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'enableSchemaCache' => true,
'schemaCacheDuration' => 3600,
'schemaCache' => 'cache',
],
'db3' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=h2h_db3',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'enableSchemaCache' => true,
'schemaCacheDuration' => 3600,
'schemaCache' => 'cache',
],
'db4' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=h2h_db4',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'enableSchemaCache' => true,
'schemaCacheDuration' => 3600,
'schemaCache' => 'cache',
],
'db5' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=h2h_db5',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'enableSchemaCache' => true,
'schemaCacheDuration' => 3600,
'schemaCache' => 'cache',
],
'db6' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=h2h_db6',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'enableSchemaCache' => true,
'schemaCacheDuration' => 3600,
'schemaCache' => 'cache',
],
'db7' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=h2h_db7',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'enableSchemaCache' => true,
'schemaCacheDuration' => 3600,
'schemaCache' => 'cache',
],
'db8' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=h2h_db8',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'enableSchemaCache' => true,
'schemaCacheDuration' => 3600,
'schemaCache' => 'cache',
],
'db9' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=h2h_db9',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'enableSchemaCache' => true,
'schemaCacheDuration' => 3600,
'schemaCache' => 'cache',
],
'db10' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=h2h_db10',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'enableSchemaCache' => true,
'schemaCacheDuration' => 3600,
'schemaCache' => 'cache',
],
],
];