Просмотр файла database/migrations/2023_04_15_120001_create_favorites_table.php
Размер файла: 680B
<?php
use App\Models\Favorite;
use MotorORM\Migration;
return new class
{
/**
* Run the migrations.
*
* @return void
*/
public function up(): void
{
$migration = new Migration(new Favorite());
$migration->createTable(function (Migration $table) {
$table->create('id');
$table->create('user_id');
$table->create('story_id');
$table->create('created_at');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down(): void
{
$migration = new Migration(new Favorite());
$migration->deleteTable();
}
};