mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
BYOD migration
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
acd182e3d2
commit
45019c65f1
34
database/migrations/2023_01_18_122534_add_byod_to_assets.php
Normal file
34
database/migrations/2023_01_18_122534_add_byod_to_assets.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddByodToAssets extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('assets', function (Blueprint $table) {
|
||||
$table->boolean('byod')->nullable()->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('assets', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('assets', 'byod')) {
|
||||
$table->dropColumn('byod');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue