Odyssey
tools
cumanage
db
migrations
2019071200_utilitySupport.php
1
<?php
2
/**
3
* Notes:
4
* 1. Anything complicated needs to be done with SQL.
5
* 2. Always have a check to know if the migration needs to occur (up or down).
6
* 3. Use up() and down(), not change(), because of the SQL
7
*/
8
use Phinx\Migration\AbstractMigration;
9
10
class
UtilitySupport
extends
AbstractMigration {
11
public
function
up() {
12
$tableName =
"cucmsdocs"
;
13
// Check for table
14
if
($this->hasTable($tableName)) {
15
$index = 177;
16
$section =
"Utility"
;
17
$doctype = 4;
18
$vendor =
"pdxUtility"
;
19
$sort = 1;
20
21
$sql =
"insert into $tableName (docsid, docsname, docsdesc, docstype, docstitle, docsmaintsection, docsmaintsort)
22
values ("
. $index++ .
", 'EHL_house', 'Equal Housing Lender', $doctype, '$vendor', '$section', "
. $sort++ .
"),
23
("
. $index++ .
", 'NCUA_box', 'NCUA Logo (Box)', $doctype, '$vendor', '$section', "
. $sort++ .
"),
24
("
. $index++ .
", 'NCUA_circle', 'NCUA Logo (Circle)', $doctype, '$vendor', '$section', "
. $sort++ .
"),
25
("
. $index++ .
", 'NCUA_rect', 'NCUA Logo (Rectangle)', $doctype, '$vendor', '$section', "
. $sort++ .
"),
26
("
. $index++ .
", 'recform_1', 'Reconciliation Form (1)', $doctype, '$vendor', '$section', "
. $sort++ .
"),
27
("
. $index++ .
", 'recform_2', 'Reconciliation Form (2)', $doctype, '$vendor', '$section', "
. $sort++ .
"),
28
("
. $index++ .
", 'recform_3', 'Reconciliation Form (3)', $doctype, '$vendor', '$section', "
. $sort++ .
"),
29
("
. $index++ .
", 'recform_4', 'Reconciliation Form (4)', $doctype, '$vendor', '$section', "
. $sort++ .
"),
30
("
. $index++ .
", 'recform_5', 'Reconciliation Form (5)', $doctype, '$vendor', '$section', "
. $sort++ .
"),
31
("
. $index++ .
", 'recform_6', 'Reconciliation Form (6)', $doctype, '$vendor', '$section', "
. $sort++ .
")"
;
32
$this->query($sql);
33
}
34
}
35
36
public
function
down() {
37
38
}
39
}
UtilitySupport
Definition:
2019071200_utilitySupport.php:10
Generated by
1.8.15