@@ -20,6 +20,14 @@ class AvoredFrameworkSchema extends Migration
20
20
*/
21
21
public function up ()
22
22
{
23
+ Schema::create ('languages ' , function (Blueprint $ table ) {
24
+ $ table ->increments ('id ' );
25
+ $ table ->string ('name ' )->nullable ()->default (null );
26
+ $ table ->string ('code ' )->nullable ()->default (null );
27
+ $ table ->tinyInteger ('is_default ' )->default (0 );
28
+ $ table ->timestamps ();
29
+ });
30
+
23
31
Schema::create ('categories ' , function (Blueprint $ table ) {
24
32
$ table ->increments ('id ' );
25
33
$ table ->integer ('parent_id ' )->nullable ()->default (null );
@@ -31,6 +39,21 @@ public function up()
31
39
$ table ->timestamps ();
32
40
});
33
41
42
+ Schema::create ('category_translations ' , function (Blueprint $ table ) {
43
+ $ table ->increments ('id ' );
44
+ $ table ->unsignedInteger ('category_id ' )->nullable ()->default (null );
45
+ $ table ->unsignedInteger ('language_id ' )->nullable ()->default (null );
46
+ $ table ->string ('name ' );
47
+ $ table ->string ('slug ' );
48
+ $ table ->string ('meta_title ' )->nullable ()->default (null );
49
+ $ table ->string ('meta_description ' )->nullable ()->default (null );
50
+
51
+ $ table ->timestamps ();
52
+
53
+ $ table ->foreign ('category_id ' )->references ('id ' )->on ('categories ' )->onDelete ('cascade ' );
54
+ $ table ->foreign ('language_id ' )->references ('id ' )->on ('languages ' )->onDelete ('cascade ' );
55
+ });
56
+
34
57
Schema::create ('category_filters ' , function (Blueprint $ table ) {
35
58
$ table ->increments ('id ' );
36
59
$ table ->integer ('category_id ' )->unsigned ()->nullable ()->default (null );
@@ -409,12 +432,15 @@ public function up()
409
432
$ table ->string ('image_path ' )->nullable ();
410
433
$ table ->string ('company_name ' )->nullable ();
411
434
$ table ->string ('phone ' )->nullable ();
412
- $ table ->enum ('status ' , ['GUEST ' , 'LIVE ' ])->default ('LIVE ' );
435
+ $ table ->enum ('status ' , ['GUEST ' , 'LIVE ' , ' DELETE_IN_PROGRESS ' ])->default ('LIVE ' );
413
436
$ table ->string ('tax_no ' )->nullable ()->default (null );
414
437
$ table ->timestamp ('email_verified_at ' )->nullable ();
438
+ $ table ->timestamp ('delete_due_date ' )->nullable ()->default (null );
415
439
$ table ->enum ('registered_channel ' , ['WEBSITE ' , 'FACEBOOK ' , 'TWITTER ' , 'GOOGLE ' ])->default ('WEBSITE ' );
416
440
$ table ->rememberToken ();
417
441
$ table ->timestamps ();
442
+ $ table ->softDeletes ();
443
+
418
444
});
419
445
420
446
Schema::create ('user_groups ' , function (Blueprint $ table ) {
@@ -632,7 +658,6 @@ public function up()
632
658
$ table ->timestamps ();
633
659
});
634
660
635
-
636
661
$ countryModel = Country::whereCode ('nz ' )->first ();
637
662
$ countryModel ->update (['is_active ' => 1 ]);
638
663
$ siteCurrency = SiteCurrency::create ([
@@ -776,6 +801,7 @@ public function down()
776
801
Schema::dropIfExists ('product_images ' );
777
802
Schema::dropIfExists ('product_prices ' );
778
803
Schema::dropIfExists ('products ' );
804
+ Schema::dropIfExists ('category_translations ' );
779
805
Schema::dropIfExists ('categories ' );
780
806
781
807
Schema::dropIfExists ('attributes ' );
@@ -805,5 +831,6 @@ public function down()
805
831
Schema::dropIfExists ('roles ' );
806
832
Schema::dropIfExists ('states ' );
807
833
Schema::dropIfExists ('countries ' );
834
+ Schema::dropIfExists ('languages ' );
808
835
}
809
836
}
0 commit comments