Fixed seeders

This commit is contained in:
jitendra 2018-10-26 13:54:10 +05:30
parent 0231c26da2
commit fbe8f844e1
4 changed files with 6 additions and 5911 deletions

3
.gitignore vendored
View File

@ -15,4 +15,5 @@ Homestead.yaml
npm-debug.log
yarn-error.log
.env
/ignorables/*
/ignorables/*
composer.lock

5907
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,7 @@
<?php
use Illuminate\Database\Seeder;
use Webkul\Admin\Database\Seeders\DatabaseSeeder as BagistoDatabaseSeeder;
class DatabaseSeeder extends Seeder
{
@ -11,6 +12,6 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
// $this->call(UsersTableSeeder::class);
$this->call(BagistoDatabaseSeeder::class);
}
}

View File

@ -16,7 +16,7 @@ class CreateCustomersTable extends Migration
Schema::create('customers', function (Blueprint $table) {
$table->increments('id');
$table->integer('channel_id')->unsigned();
$table->foreign('channel_id')->references('id')->on('channels');
$table->foreign('channel_id')->references('id')->on('channels')->onDelete('SET NULL');
$table->string('first_name');
$table->string('last_name');
$table->enum('gender', ['Male', 'Female']);
@ -26,7 +26,7 @@ class CreateCustomersTable extends Migration
$table->tinyInteger('status')->default(1);
$table->string('password');
$table->integer('customer_group_id')->unsigned()->nullable();
$table->foreign('customer_group_id')->references('id')->on('customer_groups')->onDelete('cascade');
$table->foreign('customer_group_id')->references('id')->on('customer_groups')->onDelete('SET NULL');
$table->boolean('subscribed_to_news_letter')->default(0);
$table->rememberToken();
$table->timestamps();