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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
<h2>Here you can migrate your database from one system to another</h2>
{form}
<input type="hidden" name="step" value="{$next_step}" />
<input type="hidden" name="gBitDbPassword_hash" value="{$gBitDbPassword_hash}" />
{jstabs}
{jstab title="Source Database"}
{legend legend="Source Database Information"}
<div class="form-group">
{if $error_src}
<ul class="result">
<li class="error">
Database connection could not be established.
<ul>
<li>Perhaps your database is not available</li>
<li>or the server cannot connect to it</li>
<li>or you have made a typo</li>
<li>Please double check the following settings:
<ul>
<li><strong>database name</strong></li>
<li><strong>database username</strong></li>
<li><strong>database password</strong></li>
</ul>
</li>
</ul>
</li>
</ul>
{/if}
</div>
<div class="form-group">
{formlabel label="Source database type" for="db_src"}
{forminput}
{if $dbservers}
{html_options name='db_src' options=$dbservers id=db_src selected=$db_src}
{else}
{formfeedback warning='You currently have no database installed that works here. If you feel this is wrong, please contact the <a class="external" href="http://www.bitweaver.org/">Bitweaver Team</a>.'}
{/if}
{formhelp note="The type of database you intend to use."}
{formfeedback warning="If the database you wish to use is not listed above, the version of PHP on this server does not have support for that database installed or compiled in."}
{/forminput}
</div>
<div class="form-group">
{formlabel label="Source host" for="host_src"}
{forminput}
<input type="text" class="form-control" name="host_src" id="host_src" value="{if $host_src ne '' }{$host_src}{/if}" />
{formhelp note="Hostname or IP for your MySQL database, example:<br />
Use 'localhost' if your database is on the same machine as your server.<br />
If you use Oracle, insert your TNS name here<br />
If you use SQLite, insert the path and filename to your database file<br />
If you are not sure what to put in here, try using localhost."}
{/forminput}
</div>
<div class="form-group">
{formlabel label="Source user" for="user_src"}
{forminput}
<input type="text" class="form-control" name="user_src" id="user_src" value="{$user_src}" />
{formhelp note="Database user"}
{/forminput}
</div>
<div class="form-group">
{formlabel label="Source Password" for="pass_src"}
{forminput}
<input type="password" class="form-control" name="pass_src" id="pass_src" value="{$pass_src}" />
{formhelp note="Database password"}
{/forminput}
</div>
<div class="form-group">
{formlabel label="Source database name" for="name_src"}
{forminput}
<input type="text" class="form-control" name="name_src" id="name_src" value="{$name_src}" />
{ if ( $fbpath ) }
{formhelp note="The name of the database where Bitweaver will create tables. You can
create a Firebird alias for the Bitweaver database in aliases.conf and then use that
aliase as the database name, or provide a full path and file name to create
the database in an existing directory."}
{else}
{formhelp note="The name of the database where Bitweaver will create tables. You can
create the database using mysqladmin, or PHPMyAdmin or ask your
hosting service to create a MySQL database.
Normally Bitweaver tables won't conflict with other product names."}
{/if}
{/forminput}
</div>
<div class="form-group">
{ if ( $fbpath ) }
{formhelp note="<strong>Do not use prefix with Firebird, as the field and table names are already up to 30 characters.</strong>"}
{/if}
{formlabel label="Source Database Prefix" for="prefix_src"}
{forminput}
<input type="text" class="form-control" name="prefix_src" id="prefix_src" value="{$prefix_src}" />
{formhelp note="This prefix will be prepended to the begining of every table name to allow multiple
independent install to share a single database. All Bitweaver tables begin with 'bit_' or 'users_',
so you rarely need to enter a prefix. If you are NOT running MySQL (i.e. Postgres, Oracle, etc.)
you can end the prefix string with a '.' (period) to use a schema in systems that support it.
<strong>MySQL does NOT support schemas.</strong>"}
{/forminput}
</div>
{ if ( $fbpath ) }
<div class="form-group">
{formlabel label="Firebird Installation Path" for="fbpath"}
{forminput}
<input type="text" class="form-control" size="50" name="fbpath" id="fbpath" value="{$fbpath}" />
{formhelp note="If you have modified your Firebird installation from the default please enter the correct
path to the base firebird directory. This is used to find isql in order to create the initial blank
database and should be maintained in the correct format for your OS."}
{/forminput}
</div>
{/if}
{/legend}
{/jstab}
{jstab title="Destination Database"}
{legend legend="Destination Database Information"}
<div class="form-group">
{if $error_dst}
<li class="error">
Database connection could not be established.
<ul>
<li>Perhaps your database is not available</li>
<li>or the server cannot connect to it</li>
<li>or you have made a typo</li>
<li>Please double check the following settings:
<ul>
<li><strong>database name</strong></li>
<li><strong>database username</strong></li>
<li><strong>database password</strong></li>
</ul>
</li>
</ul>
</li>
</li>
{/if}
</div>
<div class="form-group">
{formlabel label="Destination Database type" for="db_dst"}
{forminput}
{if $dbservers}
{html_options name='db_dst' options=$dbservers id=db_dst selected=$gBitDbType}
{else}
{formfeedback warning='You currently have no Database installed that works here. If you feel this is wrong, please contact the <a class="external" href="http://www.bitweaver.org/">Bitweaver Team</a>.'}
{/if}
{formhelp note="The type of database you intend to use."}
{formfeedback warning="If the database you wish to use is not listed above, the version of PHP on this server does not have support for that database installed or compiled in."}
{/forminput}
</div>
<div class="form-group">
{formlabel label="Destination Host" for="host_dst"}
{forminput}
<input type="text" class="form-control" name="host_dst" id="host_dst" value="{if $gBitDbHost ne '' }{$gBitDbHost}{/if}" />
{formhelp note="Hostname or IP for your MySQL database, example:<br />
Use 'localhost' if your database is on the same machine as your server.<br />
If you use Oracle, insert your TNS Name here<br />
If you use SQLite, insert the path and filename to your database file<br />
If you are not sure what to put in here, try using localhost."}
{/forminput}
</div>
<div class="form-group">
{formlabel label="Destination user" for="user_dst"}
{forminput}
<input type="text" class="form-control" name="user_dst" id="user_dst" value="{$gBitDbUser}" />
{formhelp note="Database user"}
{/forminput}
</div>
<div class="form-group">
{formlabel label="Destination password" for="pass_dst"}
{forminput}
<input type="password" class="form-control" name="pass_dst" id="pass_dst" value="{$gBitDbPassword_input}" />
{formhelp note="Database password"}
{/forminput}
</div>
<div class="form-group">
{formlabel label="Destination database name" for="name_dst"}
{forminput}
<input type="text" class="form-control" name="name_dst" id="name_dst" value="{$gBitDbName}" />
{ if ( $fbpath ) }
{formhelp note="The name of the database where Bitweaver will create tables. You can
create a Firebird alias for the Bitweaver database in aliases.conf and then use that
aliase as the database name, or provide a full path and file name to create
the database in an existing directory."}
{else}
{formhelp note="The name of the database where Bitweaver will create tables. You can
create the database using mysqladmin, or PHPMyAdmin or ask your
hosting service to create a MySQL database.
Normally Bitweaver tables won't conflict with other product names."}
{/if}
{/forminput}
</div>
<div class="form-group">
{ if ( $fbpath ) }
{formhelp note="<strong>Do not use prefix with Firebird, as the field and table names are already up to 30 characters.</strong>"}
{/if}
{formlabel label="Destination Database Prefix" for="prefix_dst"}
{forminput}
<input type="text" class="form-control" name="prefix_dst" id="prefix_dst" value="{$db_prefix_bit}" />
{formhelp note="This prefix will be prepended to the begining of every table name to allow multiple
independent install to share a single database. All Bitweaver tables begin with 'bit_' or 'users_',
so you rarely need to enter a prefix. If you are NOT running MySQL (i.e. Postgres, Oracle, etc.)
you can end the prefix string with a '.' (period) to use a schema in systems that support it.
<strong>MySQL does NOT support schemas.</strong>"}
{/forminput}
</div>
{ if ( $fbpath ) }
<div class="form-group">
{formlabel label="Firebird installation path" for="fbpath"}
{forminput}
<input type="text" class="form-control" size="50" name="fbpath" id="fbpath" value="{$fbpath}" />
{formhelp note="If you have modified your Firebird installation from the default please enter the correct
path to the base firebird directory. This is used to find isql in order to create the initial blank
database and should be maintained in the correct format for your OS."}
{/forminput}
</div>
{/if}
<div class="form-group">
{formlabel label="Site Base URL" for="baseurl"}
{forminput}
<input type="text" class="form-control" name="baseurl" id="baseurl" value="{$bit_root_url}" />
{formhelp note="This is the path from the server root to your Bitweaver location, i.e., if you access Bitweaver as <kbd>http://MyServer.com/applications/new/wiki/index.php</kbd> you should enter <kbd>/applications/new/</kbd>"}
{/forminput}
</div>
<div class="form-group">
<label class="checkbox">
<input type="checkbox" name="auto_bug_submit" id="auto_bug_submit"{if $auto_bug_submit} checked="checked"{/if} />Automatically submit bugs
{formhelp note="Checking this box will automatically submit fatal database errors to the Bitweaver team. If you are running a live site, we recommend you check this box, as it will also avoid horrible error messages from appearing in such cases."}
</label>
</div>
{/legend}
{/jstab}
{jstab title="Options"}
{legend legend="Migration options"}
<div class="form-group">
{formlabel label="Tables to be skipped" for="skip_tables"}
{forminput}
<select name="skip_tables[]" id="skip_tables" multiple="multiple" size="10">
{foreach from=$skip_tables item=table}
<option value="{$table}"{foreach from=$skip_tables_select item=select}
{if $select eq $table} selected="selected"{/if}
{/foreach}>{$table}</option>
{/foreach}
</select>
<br />
<input type="submit" class="btn btn-default" value="Update Tables List" name="fUpdateTables" />
{formhelp note="Please select all talbes that are not supposed to be migrated at all. You can pick some tables
here, if you prefer to migrate specific tables separately at a later timepoint. Use Ctrl+click to select
more than one, or Ctrl+A to select all tables."}
{/forminput}
</div>
<div class="form-group">
<label class="checkbox">
<input type="checkbox" name="empty_tables" id="empty_tables"{if $empty_tables} checked="checked"{/if} />DROP tables
{formhelp note="Checking this box DROP's tables before new data is migrated"}
</label>
</div>
<div class="form-group">
<label class="checkbox">
<input type="checkbox" name="convert_blobs" id="convert_blobs"{if $convert_blobs} checked="checked"{/if} />Convert Blobs
{formhelp note="Checking this box converts blobs from a MySQL type blob to a PgSQL encoded blob."}
</label>
</div>
<div class="form-group">
{forminput}
<label class="checkbox"><input type="checkbox" name="debug" id="debug"{if $debug} checked="checked"{/if} /> Debug mode</label>
{formhelp note="Display SQL statements."}
{/forminput}
</div>
<div class="form-group">
<label class="checkbox">
<input type="checkbox" name="stop_on_errors" id="stop_on_errors"{if $stop_on_errors} checked="checked"{/if} />Stop on Errors
{formhelp note="Checking this box will cause the script to stop on the first error."}
</label>
</div>
{/legend}
{/jstab}
{/jstabs}
<div class="form-group">
{forminput}
<input type="submit" class="btn btn-default" value="Execute Migration" name="fSubmitDatabase" />
{/forminput}
</div>
{/form}
|