◆ up()
| AddCrossAccountsTable::up |
( |
| ) |
|
Check for existence of file name
Table does not exist – CREATE
Definition at line 15 of file 2017121800_addcrossaccountstable.php.
19 $cuList = $this->fetchAll(
'SELECT cu FROM cuadmin');
21 for ( $i = 0; $i < count( $cuList ); $i++ ) {
22 $cu = strtolower( trim( $cuList[$i][
"cu"] ) );
27 $tableName =
"{$cu}crossaccounts";
29 $exists = $this->hasTable($tableName);
38 CREATE TABLE {$tableName} ( 39 accountnumber character (12) NOT NULL, 40 tomember character(12) NOT NULL, 41 accounttype character(12) NOT NULL, 42 deposittype character (1) NOT NULL, 43 description character varying (255), 44 misc1 character varying (255) 46 $sqlRs = $this->query($sql);
49 $sql =
"ALTER TABLE ONLY {$tableName} ADD CONSTRAINT {$tableName}_pkey PRIMARY KEY (accountnumber, tomember, accounttype, deposittype);";
50 $sqlRs = $this->query($sql);
The documentation for this class was generated from the following file: