Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 15, 2020 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/d89fe68d218fdd0e44882bcb2afb465b to your computer and use it in GitHub Desktop.
Save parzibyte/d89fe68d218fdd0e44882bcb2afb465b to your computer and use it in GitHub Desktop.
<?php
Schema::create('asistencia', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('id_alumno');
$table->dateTime("fecha_y_hora");
$table->enum("estado", ["a", "r", "f"]);// <-- Aquí el enum
$table->foreign("id_alumno")
->references("id")
->on("alumnos")
->onDelete("cascade")
->onUpdate("cascade");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment