@@ -470,36 +470,36 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
470470 $ setup ->getIdxName ($ setup ->getTable ('magefan_blog_category ' ), ['include_in_menu ' ]),
471471 ['include_in_menu ' ]
472472 );
473- if (version_compare ($ version , '2.6.3 ' ) < 0 )
474- {
475- /* Add include in recent posts into post table */
473+ }
474+
475+ if (version_compare ($ version , '2.6.3 ' ) < 0 ) {
476+ /* Add display mode field into category table */
476477 $ connection ->addColumn (
477- $ setup ->getTable ('magefan_blog_post ' ),
478- 'include_in_recent ' ,
478+ $ setup ->getTable ('magefan_blog_category ' ),
479+ 'display_mode ' ,
479480 [
480481 'type ' => \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
481482 null ,
482483 'nullable ' => false ,
483- 'default ' => '1 ' ,
484- 'comment ' => 'Include in Recent Posts ' ,
484+ 'default ' => '0 ' ,
485+ 'comment ' => 'Display Mode ' ,
485486 'after ' => 'is_active '
486487 ]
487488 );
488489 }
489490
490- }
491491
492- if (version_compare ($ version , '2.6.3 ' ) < 0 ) {
493- /* Add display mode field into category table */
492+ if (version_compare ($ version , '2.6.3.1 ' ) < 0 ) {
493+ /* Add include in recent posts into post table */
494494 $ connection ->addColumn (
495- $ setup ->getTable ('magefan_blog_category ' ),
496- 'display_mode ' ,
495+ $ setup ->getTable ('magefan_blog_post ' ),
496+ 'include_in_recent ' ,
497497 [
498498 'type ' => \Magento \Framework \DB \Ddl \Table::TYPE_SMALLINT ,
499499 null ,
500500 'nullable ' => false ,
501- 'default ' => '0 ' ,
502- 'comment ' => 'Display Mode ' ,
501+ 'default ' => '1 ' ,
502+ 'comment ' => 'Include in Recent Posts ' ,
503503 'after ' => 'is_active '
504504 ]
505505 );
0 commit comments