startSetup(); // Action to do if module version is less than 1.0.0.0 if (version_compare($context->getVersion(), '1.1.0') < 0) { $tableName = $installer->getTable('edeclic_news'); $setup->getConnection()->addColumn($tableName,'img_miniature',[ 'type' => Table::TYPE_TEXT, 'length' => 255, 'unsigned' => true, 'nullable' => false, 'default' => '', 'comment' => 'image miniature' ]); $setup->getConnection()->addColumn($tableName,'img_grande',[ 'type' => Table::TYPE_TEXT, 'length' => 255, 'unsigned' => true, 'nullable' => false, 'default' => '', 'comment' => 'grande image' ]); } if (version_compare($context->getVersion(), '1.2.0') < 0) { $tableName = $installer->getTable('edeclic_news'); $setup->getConnection()->addColumn($tableName,'store_ids',[ 'type' => Table::TYPE_TEXT, 'length' => 255, 'unsigned' => true, 'nullable' => false, 'default' => '', 'comment' => 'store view' ]); } if (version_compare($context->getVersion(), '1.3.0') < 0) { $tableName = $installer->getTable('edeclic_news'); $setup->getConnection()->addColumn($tableName,'description_courte',[ 'type' => Table::TYPE_TEXT, 'length' => 255, 'unsigned' => true, 'nullable' => false, 'default' => '', 'comment' => 'description courte' ]); } if (version_compare($context->getVersion(), '1.4.0') < 0) { $tableName = $installer->getTable('edeclic_news'); $setup->getConnection()->addColumn($tableName,'url',[ 'type' => Table::TYPE_TEXT, 'length' => 50, 'unsigned' => true, 'nullable' => false, 'default' => '', 'comment' => 'url' ]); } $setup->endSetup(); } }