eliminacion modelo y migracion evidencias_narrativas

This commit is contained in:
Christian Dacid Sullca Puma 2022-10-11 21:38:12 -05:00
parent 746931572a
commit d4b9dabaa1
3 changed files with 1 additions and 60 deletions

View File

@ -1,22 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class EvidenciasNarrativas extends Model
{
use HasFactory;
protected $table = 'evidencias_narrativas';
protected $fillable = [
'codigo',
'denominacion',
'adjunto',
];
public function narrativas()
{
return $this->belongsTo(Narrativa::class, 'id_narrativa');
}
}

View File

@ -15,7 +15,7 @@ public function up()
{ {
Schema::create('narrativas', function (Blueprint $table) { Schema::create('narrativas', function (Blueprint $table) {
$table->id(); $table->id();
$table->string('semestre', 255); $table->string('semestre', 8);
$table->mediumText('contenido'); $table->mediumText('contenido');
$table->foreignId('id_estandar') $table->foreignId('id_estandar')
->constrained('estandars') ->constrained('estandars')

View File

@ -1,37 +0,0 @@
<?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('evidencias_narrativas', function (Blueprint $table) {
$table->id();
$table->string('codigo', 16);
$table->string('denominacion', 255);
$table->string('adjunto', 255);
$table->foreignId('id_narrativa')
->constrained('narrativas')
->onDelete('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('evidencias_narrativas');
}
};