mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-22 17:06:41 -06:00
Checked tables do not exist before creating them
This commit is contained in:
parent
2ca7ab4ccf
commit
e3021120e3
@ -16,6 +16,14 @@ class Version20160820191203 extends AbstractMigration
|
||||
*/
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
// Check if the tables already exist
|
||||
$tables = $schema->getTables();
|
||||
foreach ($tables as $table) {
|
||||
if ($table->getName() === 'tags') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$this->createTagsTable($schema);
|
||||
$this->createShortUrlsInTagsTable($schema);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user