| Conditions | 6 |
| Paths | 9 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function executeCreateCommand($command) |
||
| 28 | { |
||
| 29 | if ($this->connection->pretending()) { |
||
| 30 | $this->connection->logQuery('/* ' . $command->explanation . " */\n", []); |
||
| 31 | |||
| 32 | return; |
||
| 33 | } |
||
| 34 | $options = $command->options; |
||
| 35 | |||
| 36 | if ($this->keyGenerator !== 'traditional') { |
||
| 37 | $options['keyOptions']['type'] = $this->keyGenerator; |
||
| 38 | } |
||
| 39 | |||
| 40 | if ($this->keyGenerator === 'autoincrement' && $this->incrementOffset !== 0) { |
||
| 41 | $options['keyOptions']['offset'] = $this->incrementOffset; |
||
| 42 | } |
||
| 43 | |||
| 44 | if (!$this->schemaManager->hasCollection($this->table)) { |
||
| 45 | $this->schemaManager->createCollection($this->table, $options); |
||
| 46 | } |
||
| 49 |