Files
timebank-cc-public/database/migrations/2024_11_20_095600_create_admins_table.php
Ronald Huynen 2547717edb Initial commit
2026-03-23 21:37:59 +01:00

49 lines
1.7 KiB
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('admins', function (Blueprint $table) {
$table->id();
$table->string('name')->unique();
$table->string('full_name');
$table->string('email', 191)->nullable();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->string('profile_photo_path', 2048)->nullable();
$table->text('about')->nullable();
$table->string('about_short', 150)->nullable();
$table->text('motivation')->nullable();
$table->string('website')->nullable();
$table->string('phone', 20)->nullable();
$table->boolean('phone_public')->default(0);
$table->integer('cyclos_id')->unique()->nullable();
$table->string('cyclos_salt', 32)->nullable();
$table->integer('limit_min')->nullable();
$table->integer('limit_max')->nullable();
$table->string('comment', 500)->nullable();
$table->string('lang_preference', 6)->nullable();
$table->timestamps();
$table->datetime('inactive_at')->nullable();
$table->datetime('last_login_at')->nullable();
$table->string('last_login_ip')->nullable();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('admins');
}
};