Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2671

Extension Writers Discussion • Re: updating ACP module migration

$
0
0
i tryied with two file like you say but no way

after lots of debug and studying i've found the solution! for ones who cares: that's the new file....and the "solution" below.

Code:

namespace sebo\postreact\migrations;class install_acp_module_1_3_5 extends \phpbb\db\migration\migration{public static function depends_on(){return ['\sebo\postreact\migrations\install_acp_module'];}public function update_data(){        return [            ['module.add', ['acp', 'ACP_POSTREACT_TITLE', [                    'module_basename'=> '\sebo\postreact\acp\purge_module',                    'module_langname'=> 'ACP_POSTREACT_PURGE',                    'module_mode'=> 'settings',                    'module_auth'=> 'ext_sebo/postreact && acl_a_board',            ]]],        ];}}
it's not so different from the first one, but the important think i didn't know (and why, so many times, installations would not be executed and no errors reported :x ) is:
phpbb stores migrations name file in db (XXXXXXX_migrations TABLE) so when you test migrations you have to purge (manually?!?!) the db, otherwise it's skipped and no errors would be displayed. otherwise you have to allways change che filename before trying a new migration (so purging the cache it's not enough) :oops:

Statistics: Posted by sebo — Mon Jun 23, 2025 7:22 am



Viewing all articles
Browse latest Browse all 2671

Trending Articles