Adds default for category_id bills and invoices tables.
This commit is contained in:
parent
4dea986ecb
commit
1e4fe88735
@ -11,22 +11,12 @@ class AddCategoryColumnInvoicesBills extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$driver = Schema::connection($this->getConnection())->getConnection()->getDriverName();
|
||||
|
||||
Schema::table('invoices', function ($table) use($driver) {
|
||||
if($driver === 'sqlite'){
|
||||
Schema::table('invoices', function ($table) {
|
||||
$table->integer('category_id')->default();
|
||||
}else{
|
||||
$table->integer('category_id');
|
||||
}
|
||||
});
|
||||
|
||||
Schema::table('bills', function ($table) use($driver) {
|
||||
if($driver === 'sqlite'){
|
||||
Schema::table('bills', function ($table) {
|
||||
$table->integer('category_id')->default();
|
||||
}else{
|
||||
$table->integer('category_id');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user