Files
eatvio-infra/database/migrations/2022_11_29_082657_create_recipes_table.php
2023-12-29 10:58:52 +03:00

39 lines
951 B
PHP

<?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::create('recipes', function (Blueprint $table) {
$table->id();
$table->string('image')->default('')->comment('public path to image');
$table->string('state')->comment('active/archived');
$table->integer('cooking_time')->default(0);
$table->json('ingredients');
$table->text('description');
$table->json('steps');
$table->string('youtube_url')->default('');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('recipes');
}
};