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