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

Extension Writers Discussion • Re: populate a table while migrations

$
0
0
I would do something like this - m1_main, m2_acp_module & m3_data.

In main change:

Code:

public function effectively_installed(){return $this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_postreact');}
to

Code:

public function effectively_installed(){return $this->db_tools->sql_table_exists($this->table_prefix . 'sebo_postreact_table');}
In module and data change:

Code:

public static function depends_on(){return ['\phpbb\db\migration\data\v320\v320'];}
to

Code:

public static function depends_on(){return ['sebo\postreact\migrations\m1_main'];}
In main migration I would change v320 to at least v330.
Do you even need to have effectively_installed method in every migration?

Statistics: Posted by GanstaZ — Mon Jul 29, 2024 2:33 pm



Viewing all articles
Browse latest Browse all 1830

Trending Articles