@@ -63,7 +63,7 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
6363 }
6464
6565 if (version_compare ($ version , '2.2.0 ' ) < 0 ) {
66- /* Add author field to posts tabel */
66+ /* Add author field to posts table */
6767 $ connection ->addColumn (
6868 $ setup ->getTable ('magefan_blog_post ' ),
6969 'author_id ' ,
@@ -84,7 +84,7 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
8484
8585
8686 if (version_compare ($ version , '2.2.5 ' ) < 0 ) {
87- /* Add layout field to posts and category tabels */
87+ /* Add layout field to posts and category table */
8888 foreach (['magefan_blog_post ' , 'magefan_blog_category ' ] as $ table ) {
8989 $ table = $ setup ->getTable ($ table );
9090 $ connection ->addColumn (
@@ -165,7 +165,7 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
165165 }
166166
167167 if (version_compare ($ version , '2.3.0 ' ) < 0 ) {
168- /* Add meta title field to posts tabel */
168+ /* Add meta title field to posts table */
169169 $ connection ->addColumn (
170170 $ setup ->getTable ('magefan_blog_post ' ),
171171 'meta_title ' ,
@@ -178,7 +178,7 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
178178 ]
179179 );
180180
181- /* Add og tags fields to post tabel */
181+ /* Add og tags fields to post table */
182182 foreach (['type ' , 'img ' , 'description ' , 'title ' ] as $ type ) {
183183 $ connection ->addColumn (
184184 $ setup ->getTable ('magefan_blog_post ' ),
@@ -193,7 +193,7 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
193193 );
194194 }
195195
196- /* Add meta title field to category tabel */
196+ /* Add meta title field to category table */
197197 $ connection ->addColumn (
198198 $ setup ->getTable ('magefan_blog_category ' ),
199199 'meta_title ' ,
@@ -452,7 +452,7 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
452452 }
453453
454454 if (version_compare ($ version , '2.6.2 ' ) < 0 ) {
455- /* Add include in menu field into categories tabel */
455+ /* Add include in menu field into categories table */
456456 $ connection ->addColumn (
457457 $ setup ->getTable ('magefan_blog_category ' ),
458458 'include_in_menu ' ,
@@ -473,7 +473,7 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
473473 }
474474
475475 if (version_compare ($ version , '2.6.3 ' ) < 0 ) {
476- /* Add display mode field into category tabel */
476+ /* Add display mode field into category table */
477477 $ connection ->addColumn (
478478 $ setup ->getTable ('magefan_blog_category ' ),
479479 'display_mode ' ,
@@ -488,6 +488,23 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
488488 );
489489 }
490490
491+
492+ if (version_compare ($ version , '2.6.3.1 ' ) < 0 ) {
493+ /* Add include in recent posts into post table */
494+ $ connection ->addColumn (
495+ $ setup ->getTable ('magefan_blog_post ' ),
496+ 'include_in_recent ' ,
497+ [
498+ 'type ' => \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
499+ null ,
500+ 'nullable ' => false ,
501+ 'default ' => '1 ' ,
502+ 'comment ' => 'Include in Recent Posts ' ,
503+ 'after ' => 'is_active '
504+ ]
505+ );
506+ }
507+
491508 $ setup ->endSetup ();
492509 }
493510}
0 commit comments