@@ -34,13 +34,13 @@ |
||
| 34 | 34 | }); |
| 35 | 35 | |
| 36 | 36 | Schema::table('inventories', function($table) { |
| 37 | - $table->foreign('material_type_id')->references('id')->on('material_type')->onDelete('cascade'); |
|
| 38 | - $table->foreign('brand_id')->references('id')->on('brand')->onDelete('cascade'); |
|
| 39 | - $table->foreign('model_id')->references('id')->on('brand_model')->onDelete('cascade'); |
|
| 40 | - $table->foreign('location_id')->references('id')->on('location')->onDelete('cascade'); |
|
| 41 | - $table->foreign('moneySourceId')->references('id')->on('moneySource')->onDelete('cascade'); |
|
| 42 | - $table->foreign('provider_id')->references('id')->on('providers')->onDelete('cascade'); |
|
| 43 | - }); |
|
| 37 | + $table->foreign('material_type_id')->references('id')->on('material_type')->onDelete('cascade'); |
|
| 38 | + $table->foreign('brand_id')->references('id')->on('brand')->onDelete('cascade'); |
|
| 39 | + $table->foreign('model_id')->references('id')->on('brand_model')->onDelete('cascade'); |
|
| 40 | + $table->foreign('location_id')->references('id')->on('location')->onDelete('cascade'); |
|
| 41 | + $table->foreign('moneySourceId')->references('id')->on('moneySource')->onDelete('cascade'); |
|
| 42 | + $table->foreign('provider_id')->references('id')->on('providers')->onDelete('cascade'); |
|
| 43 | + }); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -7,24 +7,24 @@ |
||
| 7 | 7 | class CreateNewsTable extends Migration |
| 8 | 8 | { |
| 9 | 9 | /** |
| 10 | - * Run the migrations. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function up() |
|
| 15 | - { |
|
| 16 | - // create table 'news' |
|
| 17 | - Schema::create('news', function (Blueprint $table) { |
|
| 18 | - $table->increments('id'); |
|
| 19 | - $table->string('title', 255); |
|
| 20 | - $table->string('slug', 100)->unique(); |
|
| 21 | - $table->text('short_description'); |
|
| 22 | - $table->text('full_content'); |
|
| 23 | - $table->string('author', 100); |
|
| 24 | - $table->string('category', 100); |
|
| 25 | - $table->timestamps(); // timestamps() creates created_at & updated_at fields |
|
| 26 | - }); |
|
| 27 | - } |
|
| 10 | + * Run the migrations. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function up() |
|
| 15 | + { |
|
| 16 | + // create table 'news' |
|
| 17 | + Schema::create('news', function (Blueprint $table) { |
|
| 18 | + $table->increments('id'); |
|
| 19 | + $table->string('title', 255); |
|
| 20 | + $table->string('slug', 100)->unique(); |
|
| 21 | + $table->text('short_description'); |
|
| 22 | + $table->text('full_content'); |
|
| 23 | + $table->string('author', 100); |
|
| 24 | + $table->string('category', 100); |
|
| 25 | + $table->timestamps(); // timestamps() creates created_at & updated_at fields |
|
| 26 | + }); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * Reverse the migrations. |