DDL
This commit is contained in:
parent
110cd7626e
commit
ce182aa792
@ -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();
|
||||||
|
@ -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');
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user