I'm pretty sure that won't work as you expect. What I would do is make thei've tryied up to put in install_data this code:it creates a loop...timout for more 120 sec...maybe too much!Code:
public static function depends_on(){return ['\phpbb\db\migration\data\v320\v320','my_name\my_ext\migrations\install_schema'];}
install_schema
migration depend on \phpbb\db\migration\data\v320\v320
and then have your install_data
migration depend on \my_name\my_ext\migrations\install_schema
. Have a look at this initial_schema file and this initial_data file.Try this.in my install_data i haveCode:
[snip]
Code:
public function table_pr_install(){$data = [['id'=> 1,'icon_id'=> 1,'icon_url'=> 'like.png''icon_width'=> 32,'icon_height'=> 32,'icon_alt'=> 'Like',],['id'=> 2,'icon_id'=> 2,'icon_url'=> 'heart.png''icon_width'=> 32,'icon_height'=> 32,'icon_alt'=> 'Heart',],['id'=> 3,'icon_id'=> 3,'icon_url'=> 'laugh.png''icon_width'=> 32,'icon_height'=> 32,'icon_alt'=> 'Laugh',],['id'=> 4,'icon_id'=> 4,'icon_url'=> 'sad.png''icon_width'=> 32,'icon_height'=> 32,'icon_alt'=> 'Sad',],['id'=> 5,'icon_id'=> 5,'icon_url'=> 'angry.png''icon_width'=> 32,'icon_height'=> 32,'icon_alt'=> 'Angry',],['id'=> 6,'icon_id'=> 6,'icon_url'=> 'surprise.png''icon_width'=> 32,'icon_height'=> 32,'icon_alt'=> 'Suprise',],];$this->db->sql_multi_insert($this->table_prefix . '_mytable', $data);}
Statistics: Posted by Kailey — Sat Jul 27, 2024 11:02 pm