ctrlpanel/database/migrations/2022_08_01_171633_create_ticketcategories_table.php

59 lines
1.2 KiB
PHP
Raw Normal View History

2022-08-01 16:52:16 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
2022-08-01 16:52:16 +00:00
2023-01-05 17:03:31 +00:00
return new class extends Migration
2022-08-01 16:52:16 +00:00
{
/**
* Run the migrations.
*
* @return void
2022-08-01 16:52:16 +00:00
*/
public function up()
{
Schema::create('ticket_categories', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
2022-08-01 16:52:16 +00:00
$table->timestamps();
});
DB::table('ticket_categories')->insert(
[
2022-08-01 16:52:16 +00:00
'name' => 'Technical',
]
2022-08-01 16:52:16 +00:00
);
DB::table('ticket_categories')->insert(
[
2022-08-01 16:52:16 +00:00
'name' => 'Billing',
]
2022-08-01 16:52:16 +00:00
);
DB::table('ticket_categories')->insert(
[
2022-08-01 16:52:16 +00:00
'name' => 'Issue',
]
2022-08-01 16:52:16 +00:00
);
DB::table('ticket_categories')->insert(
[
2022-08-01 16:52:16 +00:00
'name' => 'Request',
]
2022-08-01 16:52:16 +00:00
);
DB::table('ticket_categories')->insert(
[
2022-08-01 16:52:16 +00:00
'name' => 'Other',
]
2022-08-01 16:52:16 +00:00
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ticket_categories');
}
2023-01-05 17:03:31 +00:00
};