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

32 lines
725 B
PHP
Raw Normal View History

2022-06-14 01:21:39 +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('estandars', function (Blueprint $table) {
$table->id();
2022-07-27 05:42:33 +00:00
$table->string('name'); //cambiar el name por nombre
2022-08-02 04:44:21 +00:00
$table->timestamps();
//$table->foreign('id_user')->references('id')->on('users');
$table->foreignId('id_user')
->constrained('users');
2022-06-14 01:21:39 +00:00
});
}
2022-06-14 01:21:39 +00:00
public function down()
{
Schema::dropIfExists('estandars');
}
};