Alta de modificaciones de grupo con alumbnos y docentes
This commit is contained in:
@@ -14,6 +14,8 @@ return new class extends Migration
|
||||
Schema::create('alumno_status', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('color');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,13 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('materias', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('clave')->nullable();
|
||||
$table->unsignedBigInteger('plan_id'); // pertenece a un plan de estudios
|
||||
$table->integer('ciclo'); // en qué ciclo se imparte
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('plan_id')->references('id')->on('plans');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('docentes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->unsignedBigInteger('usuario_registro');
|
||||
$table->unsignedBigInteger('status')->default('1');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('becas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('description');
|
||||
$table->unsignedBigInteger('inscripcion')->default(0);
|
||||
$table->unsignedBigInteger('reinscripcion')->default(0);
|
||||
$table->unsignedBigInteger('seguro')->default(0);
|
||||
$table->unsignedBigInteger('colegiatura')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('becas');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('docente_user', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('docente_id');
|
||||
$table->foreign('docente_id')->references('id')->on('docentes');
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('docente_user');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tareas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tareas');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('docente_grupo', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('docente_id');
|
||||
$table->unsignedBigInteger('grupo_id');
|
||||
$table->unsignedBigInteger('materia_id');
|
||||
|
||||
$table->foreign('docente_id')->references('id')->on('docentes');
|
||||
$table->foreign('grupo_id')->references('id')->on('grupos');
|
||||
$table->foreign('materia_id')->references('id')->on('materials');
|
||||
|
||||
$table->unique(['docente_id', 'grupo_id', 'materia_id']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('docente_grupo');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user