mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
33 lines
659 B
PHP
33 lines
659 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class AddUserPermissions extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::table('users', function ($table) {
|
|
$table->boolean('is_admin')->default(true);
|
|
$table->unsignedInteger('permissions')->default(0);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::table('users', function ($table) {
|
|
$table->dropColumn('is_admin');
|
|
$table->dropColumn('permissions');
|
|
});
|
|
}
|
|
}
|