mirror of
https://github.com/shlinkio/shlink.git
synced 2026-02-28 04:03:12 +08:00
Checked tables do not exist before creating them
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user