Merge pull request #181 from andrenam/sqliteissues

SQLite: fix issues migrating and seeding
This commit is contained in:
Hillel Coren 2014-10-20 19:29:04 +03:00
commit f6e18f0e45
3 changed files with 9 additions and 9 deletions

View File

@ -26,11 +26,11 @@ class SupportHidingQuantity extends Migration {
Schema::table('invoices', function($table) Schema::table('invoices', function($table)
{ {
$table->decimal('custom_value1', 13, 2); $table->decimal('custom_value1', 13, 2)->default(0);
$table->decimal('custom_value2', 13, 2); $table->decimal('custom_value2', 13, 2)->default(0);
$table->boolean('custom_taxes1'); $table->boolean('custom_taxes1')->default(0);
$table->boolean('custom_taxes2'); $table->boolean('custom_taxes2')->default(0);
}); });
} }

View File

@ -20,14 +20,14 @@ class PaymentLibrariesSeeder extends Seeder
// check that moolah exists // check that moolah exists
if (!DB::table('gateways')->where('name', '=', 'moolah')->get()) { if (!DB::table('gateways')->where('name', '=', 'moolah')->get()) {
DB::table('gateways')->update(['recommended' => 0]); DB::table('gateways')->update(['recommended' => 0]);
DB::table('gateways')->insert([ Gateway::create(array(
'name' => 'moolah', 'name' => 'moolah',
'provider' => 'AuthorizeNet_AIM', 'provider' => 'AuthorizeNet_AIM',
'sort_order' => 1, 'sort_order' => 1,
'recommended' => 1, 'recommended' => 1,
'site_url' => 'https://invoiceninja.mymoolah.com/', 'site_url' => 'https://invoiceninja.mymoolah.com/',
'payment_library_id' => 1 'payment_library_id' => 1
]); ));
} }
/* /*

View File

@ -2,7 +2,7 @@
class Gateway extends Eloquent class Gateway extends Eloquent
{ {
public $timestamps = false; public $timestamps = true;
protected $softDelete = false; protected $softDelete = false;
public function paymentlibrary() public function paymentlibrary()