2020-10-13 08:27:42 +11:00
|
|
|
<?php
|
2020-10-22 17:46:02 +11:00
|
|
|
/**
|
|
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
|
|
|
*
|
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
|
*
|
2021-01-04 08:54:54 +11:00
|
|
|
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
2020-10-22 17:46:02 +11:00
|
|
|
*
|
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
|
*/
|
|
|
|
|
|
2020-10-13 08:27:42 +11:00
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
|
|
class ProjectNumberColumn extends Migration
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Run the migrations.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function up()
|
|
|
|
|
{
|
2020-11-25 15:19:52 +01:00
|
|
|
Schema::table('projects', function ($table) {
|
2020-10-13 08:27:42 +11:00
|
|
|
$table->string('number')->nullable();
|
2021-04-08 19:50:27 +10:00
|
|
|
$table->unique(['company_id', 'number']);
|
2020-10-13 08:27:42 +11:00
|
|
|
});
|
2020-10-13 15:08:56 +11:00
|
|
|
|
2020-11-25 15:19:52 +01:00
|
|
|
Schema::table('expenses', function ($t) {
|
2020-10-13 15:08:56 +11:00
|
|
|
$t->renameColumn('expense_date', 'date');
|
|
|
|
|
});
|
2020-10-13 15:14:13 +11:00
|
|
|
|
2020-11-25 15:19:52 +01:00
|
|
|
Schema::table('expense_categories', function ($t) {
|
2020-10-13 15:14:13 +11:00
|
|
|
$t->boolean('is_deleted')->default(false);
|
|
|
|
|
});
|
2020-10-13 08:27:42 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Reverse the migrations.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function down()
|
|
|
|
|
{
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
}
|