Fixes for CI
This commit is contained in:
parent
14b568b735
commit
96673a9e53
@ -63,7 +63,6 @@ before_script:
|
||||
# DB_DATABASE=project_name
|
||||
# DB_USERNAME=root
|
||||
# DB_PASSWORD=secret
|
||||
- cp .env.testing .env
|
||||
|
||||
# Run npm build
|
||||
# comment this out if you don't have a frontend build
|
||||
@ -72,8 +71,8 @@ before_script:
|
||||
- npm run dev
|
||||
|
||||
# Generate an application key. Re-cache.
|
||||
- php artisan key:generate
|
||||
- php artisan config:cache
|
||||
- php artisan key:generate --env=testing
|
||||
- php artisan config:cache --env=testing
|
||||
|
||||
# Run database migrations.
|
||||
- php artisan migrate
|
||||
|
38
database/migrations/2018_07_10_034223_users_add_language.php
Normal file
38
database/migrations/2018_07_10_034223_users_add_language.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class UsersAddLanguage extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->integer('language_id')->nullable();
|
||||
$table->foreign('language_id')->references('id')->on('ab_language');
|
||||
$table->integer('currency_id')->nullable();
|
||||
$table->foreign('currency_id')->references('id')->on('ab_currency');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropForeign(['language_id']);
|
||||
$table->dropColumn('language_id');
|
||||
$table->dropForeign(['currency_id']);
|
||||
$table->dropColumn('currency_id');
|
||||
});
|
||||
}
|
||||
}
|
@ -17,7 +17,6 @@ class DatabaseSeeder extends Seeder
|
||||
LanguageTableSeeder::class,
|
||||
SiteTableSeeder::class,
|
||||
UserTableSeeder::class,
|
||||
RtmTableSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
use App\Models\Rtm;
|
||||
|
||||
class RtmTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$o = new Rtm;
|
||||
$o->id = 1;
|
||||
$o->site_id = 1;
|
||||
$o->account_id = 1;
|
||||
$o->name = 'Wholesaler';
|
||||
$o->save();
|
||||
}
|
||||
}
|
@ -19,6 +19,9 @@ class UserTableSeeder extends Seeder
|
||||
$o->language_id = 1;
|
||||
$o->country_id = 61;
|
||||
$o->currency_id = 610;
|
||||
$o->active = 1;
|
||||
$o->firstname = 'Wholesaler';
|
||||
$o->lastname = 'User';
|
||||
$o->email = 'wholesaler@example.com';
|
||||
$o->save();
|
||||
|
||||
@ -28,6 +31,9 @@ class UserTableSeeder extends Seeder
|
||||
$o->language_id = 1;
|
||||
$o->country_id = 61;
|
||||
$o->currency_id = 610;
|
||||
$o->active = 1;
|
||||
$o->firstname = 'reseller1-0';
|
||||
$o->lastname = 'User';
|
||||
$o->email = 'reseller1-0@example.com';
|
||||
$o->save();
|
||||
|
||||
@ -37,6 +43,9 @@ class UserTableSeeder extends Seeder
|
||||
$o->language_id = 1;
|
||||
$o->country_id = 61;
|
||||
$o->currency_id = 610;
|
||||
$o->active = 1;
|
||||
$o->firstname = 'reseller2-0';
|
||||
$o->lastname = 'User';
|
||||
$o->email = 'reseller2-0@example.com';
|
||||
$o->save();
|
||||
|
||||
@ -46,6 +55,9 @@ class UserTableSeeder extends Seeder
|
||||
$o->language_id = 1;
|
||||
$o->country_id = 61;
|
||||
$o->currency_id = 610;
|
||||
$o->active = 1;
|
||||
$o->firstname = 'reseller2-1';
|
||||
$o->lastname = 'User';
|
||||
$o->email = 'reseller2-1@example.com';
|
||||
$o->save();
|
||||
|
||||
@ -55,6 +67,9 @@ class UserTableSeeder extends Seeder
|
||||
$o->language_id = 1;
|
||||
$o->country_id = 61;
|
||||
$o->currency_id = 610;
|
||||
$o->active = 1;
|
||||
$o->firstname = 'user1-0-1';
|
||||
$o->lastname = 'User';
|
||||
$o->email = 'user1-0-1@example.com';
|
||||
$o->save();
|
||||
|
||||
@ -64,8 +79,10 @@ class UserTableSeeder extends Seeder
|
||||
$o->language_id = 1;
|
||||
$o->country_id = 61;
|
||||
$o->currency_id = 610;
|
||||
$o->active = 1;
|
||||
$o->firstname = 'user2-1-1';
|
||||
$o->lastname = 'User';
|
||||
$o->email = 'user2-1-1@example.com';
|
||||
$o->save();
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user