Merge branch 'spidev' into 'master'
Pop Updates See merge request fronk/thetool!1953
This commit is contained in:
33
db/migrations/20251214180619_add_pop_field_category.php
Normal file
33
db/migrations/20251214180619_add_pop_field_category.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class AddPopFieldCategory extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$timerecordingCategory = $this->table("Pop");
|
||||
$timerecordingCategory->addColumn("category", "integer", ["null" => false, "default" => 1, "after" => "name"]);
|
||||
$timerecordingCategory->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table('Pop');
|
||||
$table->removeColumn("category");
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user