Exemplo n.º 1
0
 public function __construct(Setup $installer, Factory $helperFactory, Tables $tablesObject, $tableName)
 {
     $this->installer = $installer;
     $this->connection = $installer->getConnection();
     $this->helperFactory = $helperFactory;
     $this->tablesObject = $tablesObject;
     if (!$this->tablesObject->isExists($tableName)) {
         throw new \Ess\M2ePro\Model\Exception\Setup("Table Name does not exist.");
     }
     $this->tableName = $this->tablesObject->getFullName($tableName);
 }
Exemplo n.º 2
0
 private function getFullTableName($tableName)
 {
     return $this->tablesObject->getFullName($tableName);
 }
Exemplo n.º 3
0
 private function getNotCompletedUpgrades()
 {
     $select = $this->getConnection()->select()->from($this->tablesObject->getFullName('setup'))->where('version_from IS NOT NULL')->where('version_to IS NOT NULL')->where('is_backuped = ?', 1)->where('is_completed = ?', 0);
     return $this->getConnection()->fetchAssoc($select);
 }
Exemplo n.º 4
0
 private function getResultTableName($table)
 {
     return $this->tablesObject->getFullName($table) . self::BACKUP_TABLE_SUFFIX . '_v' . str_replace('.', '_', $this->versionFrom) . '_v' . str_replace('.', '_', $this->versionTo);
 }