| @@ 391-404 (lines=14) @@ | ||
| 388 | return $this; |
|
| 389 | } |
|
| 390 | ||
| 391 | private function dropTables() |
|
| 392 | { |
|
| 393 | $this->resetNatTimer(); |
|
| 394 | ||
| 395 | $em = $this->getEntityManager(); |
|
| 396 | $metadatas = $em->getMetadataFactory()->getAllMetadata(); |
|
| 397 | $schemaTool = new SchemaTool($em); |
|
| 398 | ||
| 399 | $schemaTool->dropSchema($metadatas); |
|
| 400 | ||
| 401 | $em->getConnection()->executeQuery('DROP TABLE IF EXISTS doctrine_migration_versions'); |
|
| 402 | ||
| 403 | return $this; |
|
| 404 | } |
|
| 405 | ||
| 406 | /** |
|
| 407 | * @return EntityManager |
|
| @@ 438-449 (lines=12) @@ | ||
| 435 | return $em = $this->app['orm.em']; |
|
| 436 | } |
|
| 437 | ||
| 438 | private function createTables() |
|
| 439 | { |
|
| 440 | $this->resetNatTimer(); |
|
| 441 | ||
| 442 | $em = $this->getEntityManager(); |
|
| 443 | $metadatas = $em->getMetadataFactory()->getAllMetadata(); |
|
| 444 | $schemaTool = new SchemaTool($em); |
|
| 445 | ||
| 446 | $schemaTool->createSchema($metadatas); |
|
| 447 | ||
| 448 | return $this; |
|
| 449 | } |
|
| 450 | ||
| 451 | private function insert() |
|
| 452 | { |
|