File: /home/ser65kty/cardedeu.serversmw.com/database/migrations/2024_11_25_094713_create_cursos_table.php
<?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('cursos', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->boolean('actiu')->default(1);
$table->boolean('actiufrontend')->default(1);
$table->string('imatge')->nullable();
$table->enum('type', ['curs','taller'])->default('curs');
$table->enum('categoriasformacio', ['ocupacional','ocupabilitat','competencies','joves'])->default('ocupacional');
$table->enum('tipuspo', ['presencial','online'])->default('presencial');
$table->longText('descripciocurta')->nullable();
$table->longText('descripcio')->nullable();
$table->longText('objectius')->nullable();
$table->longText('continguts')->nullable();
$table->longText('requisits')->nullable();
$table->string('link')->nullable();
$table->string('ubicacio')->nullable();
$table->date('datainici')->nullable();
$table->date('datafi')->nullable();
$table->string('durada')->nullable();
$table->string('horari')->nullable();
$table->date('endinsc')->nullable();
$table->integer('places')->nullable();
$table->string('material')->nullable();
$table->boolean('preinscripcio')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cursos');
}
};