-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add optional migration to remove not needed tables + readme
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/migrations/2.0-to-3.0/m241018_114631_drop_queue_manager_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
use yii\db\Migration; | ||
|
||
/** | ||
* Handles the dropping of table `{{%queue_manager}}`. | ||
*/ | ||
class m241018_114631_drop_queue_manager_table extends Migration | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function up() | ||
{ | ||
$tableName = '{{%queue_manager}}'; | ||
// Check if the table exists before dropping | ||
if ($this->db->schema->getTableSchema($tableName, true) !== null) { | ||
$this->dropTable($tableName); | ||
} | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function down() | ||
{ | ||
echo "m241018_114631_drop_queue_manager_table cannot be reverted.\n"; | ||
return false; | ||
} | ||
} |