This commit is contained in:
Dr Masroor Ehsan 2025-01-06 23:01:35 +06:00
parent 110cd7626e
commit ce182aa792
3 changed files with 6 additions and 6 deletions

View File

@ -8,9 +8,9 @@
{ {
public function up(): void public function up(): void
{ {
Schema::create('institutes', function (Blueprint $table) { Schema::create('institutes', static function (Blueprint $table) {
$table->id(); $table->id();
$table->uuid('guid')->unique()->index()->default(DB::raw("concat('INS-', gen_random_uuid())")); $table->string('guid', 40)->unique()->index()->default(DB::raw("concat('INS-', gen_random_uuid())"));
$table->string('name')->unique(); $table->string('name')->unique();
$table->boolean('is_active')->default(false); $table->boolean('is_active')->default(false);
$table->string('address')->nullable(); $table->string('address')->nullable();

View File

@ -8,9 +8,9 @@
{ {
public function up(): void public function up(): void
{ {
Schema::create('facilities', function (Blueprint $table) { Schema::create('facilities', static function (Blueprint $table) {
$table->id(); $table->id();
$table->uuid('guid')->unique()->index()->default(DB::raw("concat('FAC-', gen_random_uuid())")); $table->string('guid', 40)->unique()->index()->default(DB::raw("concat('FAC-', gen_random_uuid())"));
$table->boolean('is_active')->default(false); $table->boolean('is_active')->default(false);
$table->foreignId('institute_id')->constrained('institutes')->cascadeOnDelete(); $table->foreignId('institute_id')->constrained('institutes')->cascadeOnDelete();
$table->string('name'); $table->string('name');

View File

@ -10,9 +10,9 @@
{ {
public function up(): void public function up(): void
{ {
Schema::create('users', function (Blueprint $table) { Schema::create('users', static function (Blueprint $table) {
$table->id(); $table->id();
$table->uuid('guid')->unique()->index()->default(DB::raw("concat('USR-', gen_random_uuid())")); $table->string('guid', 40)->unique()->index()->default(DB::raw("concat('USR-', gen_random_uuid())"));
$table->boolean('is_active')->default(true); $table->boolean('is_active')->default(true);
$table->string('first_name'); $table->string('first_name');
$table->string('last_name')->nullable(); $table->string('last_name')->nullable();