@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | private function tableExists($name) { |
43 | - $result = $this->pdo->query('SELECT name FROM sqlite_master WHERE type="table" and name="'. $name.'"'); |
|
43 | + $result = $this->pdo->query('SELECT name FROM sqlite_master WHERE type="table" and name="' . $name . '"'); |
|
44 | 44 | return count($result->fetchAll()) == 1; |
45 | 45 | } |
46 | 46 | |
@@ -60,14 +60,14 @@ discard block |
||
60 | 60 | $this->stmtCache->clearCache(); |
61 | 61 | |
62 | 62 | // Create temp table to create a new structure |
63 | - $affix = '_'.substr(md5($table), 0, 6); |
|
63 | + $affix = '_' . substr(md5($table), 0, 6); |
|
64 | 64 | $tempTable = $table . $affix; |
65 | 65 | $this->generalEditor->createTable($tempTable, $primaryKey, $data); |
66 | 66 | $this->alterColumns($tempTable, $primaryKey, $data); |
67 | 67 | $this->copyTableData($table, $tempTable); |
68 | 68 | |
69 | - $this->pdo->query('DROP TABLE IF EXISTS ' . $table ); |
|
70 | - $this->pdo->query('ALTER TABLE ' . $tempTable . ' RENAME TO '. $table ); |
|
69 | + $this->pdo->query('DROP TABLE IF EXISTS ' . $table); |
|
70 | + $this->pdo->query('ALTER TABLE ' . $tempTable . ' RENAME TO ' . $table); |
|
71 | 71 | |
72 | 72 | } |
73 | 73 |