first
This commit is contained in:
@ -0,0 +1,47 @@
|
||||
<?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
|
||||
{
|
||||
\kernel\App::$db->schema->create('event', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title', 255)->nullable(false);
|
||||
$table->string('type', 255)->nullable(false);
|
||||
$table->integer('hours_count')->nullable(false);
|
||||
$table->dateTime('date_start')->nullable(false);
|
||||
$table->dateTime('date_end')->nullable(true);
|
||||
$table->string('place')->nullable(false);
|
||||
$table->text('event_format')->nullable(true);
|
||||
$table->text('description')->nullable(false);
|
||||
$table->text('additional_info')->nullable(true);
|
||||
$table->integer('status')->nullable(true)->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
\kernel\App::$db->schema->create('event_contact', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title', 255)->nullable(false);
|
||||
$table->string('type', 255)->nullable(false);
|
||||
$table->integer('event_id')->nullable(false);
|
||||
$table->integer('status')->nullable(true)->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
\kernel\App::$db->schema->dropIfExists('event_contact');
|
||||
\kernel\App::$db->schema->dropIfExists('event');
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user