unsa-pis-be/database/migrations/2022_10_07_184658_create_narrativas_table.php

37 lines
794 B
PHP
Raw Normal View History

2022-10-08 00:35:47 +00:00
<?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('narrativas', function (Blueprint $table) {
$table->id();
$table->string('semestre', 8);
2022-10-10 20:32:12 +00:00
$table->mediumText('contenido');
$table->foreignId('id_estandar')
->constrained('estandars')
->onDelete('cascade');
2022-10-08 00:35:47 +00:00
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('narrativas');
}
};