schema condition in product flat table
This commit is contained in:
parent
308b3be1d8
commit
b8561d4d5e
|
|
@ -14,25 +14,25 @@ class AddRemainingColumnInProductFlatTable extends Migration
|
|||
public function up()
|
||||
{
|
||||
Schema::table('product_flat', function (Blueprint $table) {
|
||||
if (! Schema::hasColumn('short_description')) {
|
||||
if (! Schema::hasColumn('product_flat', 'short_description')) {
|
||||
$table->text('short_description')->nullable();
|
||||
}
|
||||
if (! Schema::hasColumn('meta_title')) {
|
||||
if (! Schema::hasColumn('product_flat', 'meta_title')) {
|
||||
$table->text('meta_title')->nullable();
|
||||
}
|
||||
if (! Schema::hasColumn('meta_keywords')) {
|
||||
if (! Schema::hasColumn('product_flat', 'meta_keywords')) {
|
||||
$table->text('meta_keywords')->nullable();
|
||||
}
|
||||
if (! Schema::hasColumn('meta_description')) {
|
||||
if (! Schema::hasColumn('product_flat', 'meta_description')) {
|
||||
$table->text('meta_description')->nullable();
|
||||
}
|
||||
if (! Schema::hasColumn('width')) {
|
||||
if (! Schema::hasColumn('product_flat', 'width')) {
|
||||
$table->decimal('width', 12, 4)->nullable();
|
||||
}
|
||||
if (! Schema::hasColumn('height')) {
|
||||
if (! Schema::hasColumn('product_flat', 'height')) {
|
||||
$table->decimal('height', 12, 4)->nullable();
|
||||
}
|
||||
if (! Schema::hasColumn('depth')) {
|
||||
if (! Schema::hasColumn('product_flat', 'depth')) {
|
||||
$table->decimal('depth', 12, 4)->nullable();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue