2021-04-16 01:00:00 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
class CreateButtonsTable extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('buttons', function (Blueprint $table) {
|
|
|
|
$table->id();
|
|
|
|
$table->string('name');
|
|
|
|
$table->timestamps();
|
|
|
|
});
|
2021-07-06 10:43:30 +02:00
|
|
|
|
|
|
|
// https://laraveldaily.com/set-auto-increment-start-laravel-migrations/
|
|
|
|
DB::statement("ALTER TABLE `buttons` AUTO_INCREMENT=0;");
|
2021-04-16 01:00:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('buttons');
|
|
|
|
}
|
|
|
|
}
|