| @@ 412-425 (lines=14) @@ | ||
| 409 | return $this; |
|
| 410 | } |
|
| 411 | ||
| 412 | private function dropTables() |
|
| 413 | { |
|
| 414 | $this->resetNatTimer(); |
|
| 415 | ||
| 416 | $em = $this->getEntityManager(); |
|
| 417 | $metadatas = $em->getMetadataFactory()->getAllMetadata(); |
|
| 418 | $schemaTool = new SchemaTool($em); |
|
| 419 | ||
| 420 | $schemaTool->dropSchema($metadatas); |
|
| 421 | ||
| 422 | $em->getConnection()->executeQuery('DROP TABLE IF EXISTS doctrine_migration_versions'); |
|
| 423 | ||
| 424 | return $this; |
|
| 425 | } |
|
| 426 | ||
| 427 | /** |
|
| 428 | * @return EntityManager |
|
| @@ 458-469 (lines=12) @@ | ||
| 455 | return $em = $this->app['orm.em']; |
|
| 456 | } |
|
| 457 | ||
| 458 | private function createTables() |
|
| 459 | { |
|
| 460 | $this->resetNatTimer(); |
|
| 461 | ||
| 462 | $em = $this->getEntityManager(); |
|
| 463 | $metadatas = $em->getMetadataFactory()->getAllMetadata(); |
|
| 464 | $schemaTool = new SchemaTool($em); |
|
| 465 | ||
| 466 | $schemaTool->createSchema($metadatas); |
|
| 467 | ||
| 468 | return $this; |
|
| 469 | } |
|
| 470 | ||
| 471 | private function insert() |
|
| 472 | { |
|