Applies Changes

This commit is contained in:
Berkay Güre 2018-07-15 15:07:56 +03:00 committed by Berkay Güre
parent c39b9870ef
commit 253f0f1451
14 changed files with 47 additions and 62 deletions

View File

@ -37,12 +37,8 @@ class Info
return phpversion();
}
public static function mysqlVersion()
{
if(\App::environment() === "testing") {
return DB::selectOne('select sqlite_version() as mversion')->mversion;
}
return DB::selectOne('select version() as mversion')->mversion;
}
public static function mysqlVersion()
{
return DB::selectOne('select version() as mversion')->mversion;
}
}

View File

@ -26,21 +26,13 @@ class AddCurrencyColumns extends Migration
* @return void
*/
public function down()
{
Schema::table('currencies', function ($table) {
$table->dropColumn('precision');
});
{
Schema::table('currencies', function ($table) {
$table->dropColumn('precision');
$table->dropColumn('symbol');
});
Schema::table('currencies', function ($table) {
$table->dropColumn('symbol_first');
});
Schema::table('currencies', function ($table) {
$table->dropColumn('decimal_mark');
});
Schema::table('currencies', function ($table) {
$table->dropColumn('thousands_separator');
});
}
}
}

View File

@ -4,35 +4,35 @@ use Illuminate\Database\Migrations\Migration;
class AddCategoryColumnInvoicesBills extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('invoices', function ($table) {
$table->integer('category_id')->nullable();
});
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('invoices', function ($table) {
$table->integer('category_id');
});
Schema::table('bills', function ($table) {
$table->integer('category_id')->nullable();
});
}
Schema::table('bills', function ($table) {
$table->integer('category_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('invoices', function ($table) {
$table->dropColumn('category_id');
});
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('invoices', function ($table) {
$table->dropColumn('category_id');
});
Schema::table('bills', function ($table) {
$table->dropColumn('category_id');
});
}
Schema::table('bills', function ($table) {
$table->dropColumn('category_id');
});
}
}

View File

@ -26,7 +26,7 @@ class Accounts extends Seeder
private function create()
{
$company_id = Company::first()->id;
$company_id = $this->command->argument('company');
$rows = [
[

View File

@ -26,7 +26,7 @@ class BillStatuses extends Seeder
private function create()
{
$company_id = Company::first()->id;
$company_id = $this->command->argument('company');
$rows = [
[

View File

@ -26,7 +26,7 @@ class Categories extends Seeder
private function create()
{
$company_id = Company::first()->id;
$company_id = $this->command->argument('company');
$rows = [
[

View File

@ -26,7 +26,7 @@ class Currencies extends Seeder
private function create()
{
$company_id = Company::first()->id;
$company_id = $this->command->argument('company');
$rows = [
[

View File

@ -11,7 +11,6 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
$this->call(\Database\Seeds\TestCompany::class);
$this->call(CompanySeeder::class);
//
}
}

View File

@ -26,7 +26,7 @@ class InvoiceStatuses extends Seeder
private function create()
{
$company_id = Company::first()->id;
$company_id = $this->command->argument('company');
$rows = [
[

View File

@ -26,7 +26,7 @@ class Modules extends Seeder
private function create()
{
$company_id = Company::first()->id;
$company_id = $this->command->argument('company');
Artisan::call('module:install', ['alias' => 'offlinepayment', 'company_id' => $company_id]);
Artisan::call('module:install', ['alias' => 'paypalstandard', 'company_id' => $company_id]);

View File

@ -10,10 +10,6 @@ use Illuminate\Database\Seeder;
class Roles extends Seeder
{
public function __construct()
{
}
/**
* Run the database seeds.
*

View File

@ -25,7 +25,7 @@ class Settings extends Seeder
private function create()
{
$company_id = Company::first()->id;
$company_id = $this->command->argument('company');
Setting::set([
'general.date_format' => 'd M Y',

View File

@ -26,7 +26,7 @@ class Taxes extends Seeder
private function create()
{
$company_id = Company::first()->id;
$company_id = $this->command->argument('company');
$rows = [
[

View File

@ -5,6 +5,7 @@ namespace Tests;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Facades\Artisan;
abstract class TestCase extends BaseTestCase
{
@ -13,6 +14,7 @@ abstract class TestCase extends BaseTestCase
protected function setUp()
{
parent::setUp();
$this->artisan('db:seed');
Artisan::call('db:seed', ['--class' => '\Database\Seeds\TestCompany', '--force' => true]);
Artisan::call('company:seed',['company' => 1]);
}
}