2022-11-27 02:34:36 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
2023-02-02 12:16:01 +00:00
|
|
|
return new class extends Migration
|
|
|
|
{
|
2022-11-27 02:34:36 +00:00
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2023-01-14 10:02:27 +00:00
|
|
|
public function up(): void
|
2022-11-27 02:34:36 +00:00
|
|
|
{
|
|
|
|
Schema::create('applications', function (Blueprint $table) {
|
|
|
|
$table->id();
|
|
|
|
$table->string('name')->index();
|
|
|
|
$table->string('description')->nullable();
|
2023-02-02 12:11:41 +00:00
|
|
|
$table->string('api_token')->unique();
|
2022-11-27 02:34:36 +00:00
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2023-01-14 10:02:27 +00:00
|
|
|
public function down(): void
|
2022-11-27 02:34:36 +00:00
|
|
|
{
|
|
|
|
Schema::dropIfExists('applications');
|
|
|
|
}
|
|
|
|
};
|