added table

This commit is contained in:
2023-05-06 18:16:53 +10:00
parent a494dbe662
commit 171cfa7aab

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('shortlinks', function (Blueprint $table) {
$table->id();
$table->string('code', 4)->unique();
$table->string('url');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('shortlinks');
}
};