Просмотр файла database/migrations/2023_04_15_120005_create_reads_table.php

Размер файла: 663B
<?php

use App\Models\Read;
use MotorORM\Migration;

return new class
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up(): void
    {
        $migration = new Migration(new Read());
        $migration->createTable(function (Migration $table) {
            $table->create('id');
            $table->create('story_id');
            $table->create('ip');
            $table->create('created_at');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down(): void
    {
        $migration = new Migration(new Read());
        $migration->deleteTable();
    }
};