| @@ 421-434 (lines=14) @@ | ||
| 418 | return $this; |
|
| 419 | } |
|
| 420 | ||
| 421 | private function dropTables() |
|
| 422 | { |
|
| 423 | $this->resetNatTimer(); |
|
| 424 | ||
| 425 | $em = $this->getEntityManager(); |
|
| 426 | $metadatas = $em->getMetadataFactory()->getAllMetadata(); |
|
| 427 | $schemaTool = new SchemaTool($em); |
|
| 428 | ||
| 429 | $schemaTool->dropSchema($metadatas); |
|
| 430 | ||
| 431 | $em->getConnection()->executeQuery('DROP TABLE IF EXISTS doctrine_migration_versions'); |
|
| 432 | ||
| 433 | return $this; |
|
| 434 | } |
|
| 435 | ||
| 436 | /** |
|
| 437 | * @return EntityManager |
|
| @@ 498-509 (lines=12) @@ | ||
| 495 | return $em = $this->app['orm.em']; |
|
| 496 | } |
|
| 497 | ||
| 498 | private function createTables() |
|
| 499 | { |
|
| 500 | $this->resetNatTimer(); |
|
| 501 | ||
| 502 | $em = $this->getEntityManager(); |
|
| 503 | $metadatas = $em->getMetadataFactory()->getAllMetadata(); |
|
| 504 | $schemaTool = new SchemaTool($em); |
|
| 505 | ||
| 506 | $schemaTool->createSchema($metadatas); |
|
| 507 | ||
| 508 | return $this; |
|
| 509 | } |
|
| 510 | ||
| 511 | private function importCsv() { |
|
| 512 | ||