mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-03 13:28:41 +00:00
Use hasTable instead of try/catch
This commit is contained in:
parent
43e1711eb6
commit
ad46f2fb46
1 changed files with 1 additions and 7 deletions
|
@ -28,13 +28,7 @@ class Version20160401000000 extends AbstractMigration implements ContainerAwareI
|
|||
*/
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
try {
|
||||
$schema->getTable($this->getTable('entry'));
|
||||
|
||||
$this->skipIf(true, 'Database already initialized');
|
||||
} catch (SchemaException $e) {
|
||||
// it's ok, the table does not exist we can proceed to the initial migration
|
||||
}
|
||||
$this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized');
|
||||
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
|
|
Loading…
Reference in a new issue