Fixes some sqlite issues
This commit is contained in:
parent
2a1252e6fc
commit
4dea986ecb
@ -28,11 +28,13 @@ class AddCurrencyColumns extends Migration
|
|||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('currencies', function ($table) {
|
Schema::table('currencies', function ($table) {
|
||||||
$table->dropColumn('precision');
|
$table->dropColumn([
|
||||||
$table->dropColumn('symbol');
|
'precision',
|
||||||
$table->dropColumn('symbol_first');
|
'symbol',
|
||||||
$table->dropColumn('decimal_mark');
|
'symbol_first',
|
||||||
$table->dropColumn('thousands_separator');
|
'decimal_mark',
|
||||||
|
'thousands_separator',
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,22 @@ class AddCategoryColumnInvoicesBills extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('invoices', function ($table) {
|
$driver = Schema::connection($this->getConnection())->getConnection()->getDriverName();
|
||||||
$table->integer('category_id');
|
|
||||||
|
Schema::table('invoices', function ($table) use($driver) {
|
||||||
|
if($driver === 'sqlite'){
|
||||||
|
$table->integer('category_id')->default();
|
||||||
|
}else{
|
||||||
|
$table->integer('category_id');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::table('bills', function ($table) {
|
Schema::table('bills', function ($table) use($driver) {
|
||||||
$table->integer('category_id');
|
if($driver === 'sqlite'){
|
||||||
|
$table->integer('category_id')->default();
|
||||||
|
}else{
|
||||||
|
$table->integer('category_id');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user