-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from fleetbase/dev-v1.4.0
v1.4.0
- Loading branch information
Showing
51 changed files
with
1,239 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreateDashboardsTable extends Migration | ||
{ | ||
public function up() | ||
{ | ||
Schema::create('dashboards', function (Blueprint $table) { | ||
$table->id(); | ||
$table->uuid('uuid')->nullable()->index(); | ||
$table->uuid('company_uuid')->nullable()->index(); | ||
$table->uuid('user_uuid')->nullable()->index(); | ||
$table->string('name'); | ||
$table->boolean('is_default')->default(false); | ||
$table->softDeletes(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
Schema::dropIfExists('dashboards'); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
migrations/2024_01_24_072707_create_dashboard_widgets_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreateDashboardWidgetsTable extends Migration | ||
{ | ||
public function up() | ||
{ | ||
Schema::create('dashboard_widgets', function (Blueprint $table) { | ||
$table->id(); | ||
$table->uuid('uuid')->nullable()->index(); | ||
$table->uuid('dashboard_uuid')->nullable()->index(); | ||
$table->string('name'); | ||
$table->string('component'); | ||
$table->json('grid_options'); | ||
$table->json('options'); | ||
$table->timestamps(); | ||
$table->softDeletes(); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
Schema::dropIfExists('dashboard_widgets'); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
migrations/2024_01_24_072725_add_foreign_keys_to_dashboard_widgets_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::table('dashboard_widgets', function (Blueprint $table) { | ||
$table->foreign('dashboard_uuid') | ||
->references('uuid') | ||
->on('dashboards') | ||
->onUpdate('CASCADE') | ||
->onDelete('CASCADE'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::table('dashboard_widgets', function (Blueprint $table) { | ||
$table->dropForeign(['dashboard_uuid']); | ||
}); | ||
} | ||
}; |
40 changes: 40 additions & 0 deletions
40
migrations/2024_01_30_164300_add_expires_at_column_to_personal_access_tokens_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
if (Schema::hasTable('personal_access_tokens')) { | ||
Schema::table('personal_access_tokens', function (Blueprint $table) { | ||
if (!Schema::hasColumn('personal_access_tokens', 'expires_at')) { | ||
$table->timestamp('expires_at')->nullable()->after('last_used_at'); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
if (Schema::hasTable('personal_access_tokens')) { | ||
Schema::table('personal_access_tokens', function (Blueprint $table) { | ||
if (Schema::hasColumn('personal_access_tokens', 'expires_at')) { | ||
$table->dropColumn('expires_at'); | ||
} | ||
}); | ||
} | ||
} | ||
}; |
22 changes: 22 additions & 0 deletions
22
migrations/2024_01_31_022918_add_event_column_to_activity_log_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up() | ||
{ | ||
Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) { | ||
$table->string('event')->nullable()->after('subject_type'); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) { | ||
$table->dropColumn('event'); | ||
}); | ||
} | ||
}; |
22 changes: 22 additions & 0 deletions
22
migrations/2024_01_31_022919_add_batch_uuid_column_to_activity_log_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up() | ||
{ | ||
Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) { | ||
$table->uuid('batch_uuid')->nullable()->after('properties'); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) { | ||
$table->dropColumn('batch_uuid'); | ||
}); | ||
} | ||
}; |
48 changes: 48 additions & 0 deletions
48
migrations/2024_02_04_051200_create_custom_fields_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('custom_fields', function (Blueprint $table) { | ||
$table->increments('id'); | ||
$table->uuid('uuid')->index(); | ||
$table->foreignUuid('company_uuid')->nullable()->index()->references('uuid')->on('companies'); | ||
$table->uuid('subject_uuid'); | ||
$table->string('subject_type'); | ||
$table->string('name'); | ||
$table->string('label'); | ||
$table->string('type'); | ||
$table->string('component')->nullable(); | ||
$table->json('options')->nullable(); | ||
$table->boolean('required')->default(false); | ||
$table->text('default_value')->nullable(); | ||
$table->json('validation_rules')->nullable(); | ||
$table->json('meta')->nullable(); | ||
$table->mediumText('description')->nullable(); | ||
$table->mediumText('help_text')->nullable(); | ||
$table->integer('order')->nullable(); | ||
$table->timestamps(); | ||
$table->softDeletes(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::dropIfExists('custom_fields'); | ||
} | ||
}; |
Oops, something went wrong.