/** * @param Schema $Schema * @param Table $tblGroup * * @return Table */ private function setTableMember(Schema &$Schema, Table $tblGroup) { $Table = $this->Connection->createTable($Schema, 'tblMember'); if (!$this->Connection->hasColumn('tblMember', 'serviceTblCompany')) { $Table->addColumn('serviceTblCompany', 'bigint', array('notnull' => false)); } $this->Connection->addForeignKey($Table, $tblGroup); return $Table; }
/** * @param Schema $Schema * @param $tblType * * @return Table */ private function setTableSchool(Schema &$Schema, $tblType) { $Table = $this->Connection->createTable($Schema, 'tblSchool'); if (!$this->Connection->hasColumn('tblSchool', 'serviceTblCompany')) { $Table->addColumn('serviceTblCompany', 'bigint'); } $this->Connection->addForeignKey($Table, $tblType); return $Table; }
/** * @param Schema $Schema * @param Table $tblItem * * @return Table */ private function setTableItemAccount(Schema &$Schema, Table $tblItem) { $Table = $this->Connection->createTable($Schema, 'tblItemAccount'); if (!$this->Connection->hasColumn('tblItemAccount', 'serviceBilling_Account')) { $Table->addColumn('serviceBilling_Account', 'bigint'); } $this->Connection->addForeignKey($Table, $tblItem); return $Table; }
/** * @param Schema $Schema * @param Table $tblBalance * * @return Table */ private function setTablePayment(Schema &$Schema, Table $tblBalance) { $Table = $this->Connection->createTable($Schema, 'tblPayment'); if (!$this->Connection->hasColumn('tblPayment', 'Value')) { $Table->addColumn('Value', 'decimal', array('precision' => 14, 'scale' => 4)); } if (!$this->Connection->hasColumn('tblPayment', 'Date')) { $Table->addColumn('Date', 'date'); } $this->Connection->addForeignKey($Table, $tblBalance); return $Table; }
/** * @param Schema $Schema * @param Table $tblCommodityType * * @return Table */ private function setTableCommodity(Schema &$Schema, Table $tblCommodityType) { $Table = $this->Connection->createTable($Schema, 'tblCommodity'); if (!$this->Connection->hasColumn('tblCommodity', 'Name')) { $Table->addColumn('Name', 'string'); } if (!$this->Connection->hasColumn('tblCommodity', 'Description')) { $Table->addColumn('Description', 'string'); } $this->Connection->addForeignKey($Table, $tblCommodityType); return $Table; }
/** * @param Schema $Schema * @param Table $tblCategory * @param Table $tblSubject * * @return Table */ private function setTableCategorySubject(Schema &$Schema, Table $tblCategory, Table $tblSubject) { $Table = $this->Connection->createTable($Schema, 'tblCategorySubject'); $this->Connection->addForeignKey($Table, $tblCategory); $this->Connection->addForeignKey($Table, $tblSubject); return $Table; }
/** * @param Schema $Schema * @param Table $tblRole * @param Table $tblLevel * * @return Table */ private function setTableRoleLevel(Schema &$Schema, Table $tblRole, Table $tblLevel) { $Table = $this->Connection->createTable($Schema, 'tblRoleLevel'); $this->Connection->addForeignKey($Table, $tblRole); $this->Connection->addForeignKey($Table, $tblLevel); return $Table; }
/** * @param Schema $Schema * * @param Table $tblAccount * @param Table $tblIdentification * * @return Table */ private function setTableAuthentication(Schema &$Schema, Table $tblAccount, Table $tblIdentification) { $Table = $this->Connection->createTable($Schema, 'tblAuthentication'); $this->Connection->addForeignKey($Table, $tblAccount); $this->Connection->addForeignKey($Table, $tblIdentification); return $Table; }
/** * @param Schema $Schema * @param Table $tblAccount * * @return Table */ private function setTableUser(Schema &$Schema, Table $tblAccount) { $Table = $this->Connection->createTable($Schema, 'tblUser'); if (!$this->Connection->hasColumn('tblUser', 'serviceTblPerson')) { $Table->addColumn('serviceTblPerson', 'bigint', array('notnull' => false)); } $this->Connection->addForeignKey($Table, $tblAccount); return $Table; }
/** * @param Schema $Schema * @param Table $tblSalutation * * @return Table */ private function setTablePerson(Schema &$Schema, Table $tblSalutation) { $Table = $this->Connection->createTable($Schema, 'tblPerson'); if (!$this->Connection->hasColumn('tblPerson', 'Title')) { $Table->addColumn('Title', 'string'); } if (!$this->Connection->hasColumn('tblPerson', 'FirstName')) { $Table->addColumn('FirstName', 'string'); } if (!$this->Connection->hasColumn('tblPerson', 'SecondName')) { $Table->addColumn('SecondName', 'string'); } if (!$this->Connection->hasColumn('tblPerson', 'LastName')) { $Table->addColumn('LastName', 'string'); } $this->Connection->addForeignKey($Table, $tblSalutation); return $Table; }
/** * @param Schema $Schema * @param Table $tblTempInvoice * * @return Table */ private function setTableTempInvoiceCommodity(Schema &$Schema, Table $tblTempInvoice) { $Table = $this->Connection->createTable($Schema, 'tblTempInvoiceCommodity'); if (!$this->Connection->hasColumn('tblTempInvoiceCommodity', 'serviceBilling_Commodity')) { $Table->addColumn('serviceBilling_Commodity', 'bigint'); } $this->Connection->addForeignKey($Table, $tblTempInvoice); return $Table; }
/** * @param Schema $Schema * @param Table $tblBasketCommodity * * @return Table */ private function setTableBasketCommodityDebtor(Schema &$Schema, Table $tblBasketCommodity) { $Table = $this->Connection->createTable($Schema, 'tblBasketCommodityDebtor'); if (!$this->Connection->hasColumn('tblBasketCommodityDebtor', 'serviceBilling_Debtor')) { $Table->addColumn('serviceBilling_Debtor', 'bigint'); } $this->Connection->addForeignKey($Table, $tblBasketCommodity); return $Table; }
/** * @param Schema $Schema * @param Table $tblStudentMedicalRecord * @param Table $tblStudentTransport * @param Table $tblStudentTransfer * * @return Table */ private function setTableStudent(Schema &$Schema, Table $tblStudentMedicalRecord, Table $tblStudentTransport, Table $tblStudentTransfer) { $Table = $this->Connection->createTable($Schema, 'tblStudent'); if (!$this->Connection->hasColumn('tblStudent', 'serviceTblPerson')) { $Table->addColumn('serviceTblPerson', 'bigint', array('notnull' => false)); } $this->Connection->addForeignKey($Table, $tblStudentMedicalRecord); $this->Connection->addForeignKey($Table, $tblStudentTransport); $this->Connection->addForeignKey($Table, $tblStudentTransfer); return $Table; }
/** * @param Schema $Schema * @param Table $tblProspectAppointment * @param Table $tblProspectReservation * * @return Table */ private function setTableProspect(Schema &$Schema, Table $tblProspectAppointment, Table $tblProspectReservation) { $Table = $this->Connection->createTable($Schema, 'tblProspect'); if (!$this->Connection->hasColumn('tblProspect', 'serviceTblPerson')) { $Table->addColumn('serviceTblPerson', 'bigint', array('notnull' => false)); } if (!$this->Connection->hasColumn('tblProspect', 'Remark')) { $Table->addColumn('Remark', 'text'); } $this->Connection->addForeignKey($Table, $tblProspectAppointment); $this->Connection->addForeignKey($Table, $tblProspectReservation); return $Table; }
/** * @param Schema $Schema * @param Table $tblAddress * @param Table $tblType * * @return Table */ private function setTableToCompany(Schema &$Schema, Table $tblAddress, Table $tblType) { $Table = $this->Connection->createTable($Schema, 'tblToCompany'); if (!$this->Connection->hasColumn('tblToCompany', 'Remark')) { $Table->addColumn('Remark', 'text'); } if (!$this->Connection->hasColumn('tblToCompany', 'serviceTblCompany')) { $Table->addColumn('serviceTblCompany', 'bigint', array('notnull' => false)); } $this->Connection->addForeignKey($Table, $tblAddress); $this->Connection->addForeignKey($Table, $tblType); return $Table; }
/** * @param Schema $Schema * @param Table $tblCommonBirthDates * @param Table $tblCommonInformation * * @return Table */ private function setTableCommon(Schema &$Schema, Table $tblCommonBirthDates, Table $tblCommonInformation) { $Table = $this->Connection->createTable($Schema, 'tblCommon'); if (!$this->Connection->hasColumn('tblCommon', 'serviceTblPerson')) { $Table->addColumn('serviceTblPerson', 'bigint', array('notnull' => false)); } if (!$this->Connection->hasColumn('tblCommon', 'Remark')) { $Table->addColumn('Remark', 'text'); } $this->Connection->addForeignKey($Table, $tblCommonBirthDates); $this->Connection->addForeignKey($Table, $tblCommonInformation); return $Table; }
/** * @param Schema $Schema * @param Table $tblAccountType * @param Table $tblAccountKey * * @return Table */ private function setTableAccount(Schema &$Schema, Table $tblAccountType, Table $tblAccountKey) { $Table = $this->Connection->createTable($Schema, 'tblAccount'); if (!$this->Connection->hasColumn('tblAccount', 'Number')) { $Table->addColumn('Number', 'string'); } if (!$this->Connection->hasColumn('tblAccount', 'Description')) { $Table->addColumn('Description', 'string'); } if (!$this->Connection->hasColumn('tblAccount', 'IsActive')) { $Table->addColumn('IsActive', 'boolean'); } $this->Connection->addForeignKey($Table, $tblAccountType); $this->Connection->addForeignKey($Table, $tblAccountKey); return $Table; }
/** * @param Schema $Schema * @param Table $tblDebtor * * @return Table */ private function setTableReference(Schema &$Schema, Table $tblDebtor) { $Table = $this->Connection->createTable($Schema, 'tblReference'); if (!$this->Connection->hasColumn('tblReference', 'Reference')) { $Table->addColumn('Reference', 'string'); } if (!$this->Connection->hasColumn('tblReference', 'isVoid')) { $Table->addColumn('isVoid', 'boolean'); } if (!$this->Connection->hasColumn('tblReference', 'ReferenceDate')) { $Table->addColumn('ReferenceDate', 'date', array('notnull' => false)); } if (!$this->Connection->hasColumn('tblReference', 'serviceBilling_Commodity')) { $Table->addColumn('serviceBilling_Commodity', 'bigint'); } $this->Connection->addForeignKey($Table, $tblDebtor); return $Table; }
/** * @param Schema $Schema * @param Table $tblAccountKeyType * * @return Table */ private function setTableAccountKey(Schema &$Schema, Table $tblAccountKeyType) { $Table = $this->Connection->createTable($Schema, 'tblAccountKey'); if (!$this->Connection->hasColumn('tblAccountKey', 'ValidFrom')) { $Table->addColumn('ValidFrom', 'date'); } if (!$this->Connection->hasColumn('tblAccountKey', 'Value')) { $Table->addColumn('Value', 'string'); } if (!$this->Connection->hasColumn('tblAccountKey', 'ValidTo')) { $Table->addColumn('ValidTo', 'date'); } if (!$this->Connection->hasColumn('tblAccountKey', 'Description')) { $Table->addColumn('Description', 'string'); } if (!$this->Connection->hasColumn('tblAccountKey', 'Code')) { $Table->addColumn('Code', 'integer'); } $this->Connection->addForeignKey($Table, $tblAccountKeyType); return $Table; }