Adding database/migrations/2023_01_30_224521_add_death_knight_to_card_classes.php
This commit is contained in:
parent
5fd70f3793
commit
ef7714019e
1 changed files with 23 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class AddDeathKnightToCardClasses extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
try {
|
||||
DB::transaction(function () {
|
||||
DB::statement("ALTER TABLE `cards` MODIFY COLUMN `class` ENUM('warrior', 'rogue', 'paladin', 'hunter', 'mage', 'warlock', 'shaman', 'druid', 'priest', 'dk')");
|
||||
});
|
||||
} catch (Exception $e) {
|
||||
DB::rollBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue