File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
install/migration/update_1.1.0_to_1.2.0 Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 3030 * -------------------------------------------------------------------------
3131 */
3232
33- use GlpiPlugin \Carbon \Location ;
34- use GlpiPlugin \Carbon \Source ;
35-
3633/** @var DBmysql $DB */
3734/** @var Migration $migration */
3835
39- $ table = ( new DbUtils ())-> getTableForItemType (Source::class) ;
36+ $ table = ' glpi_plugin_carbon_sources ' ;
4037$ migration ->addField (
4138 $ table ,
4239 'is_carbon_intensity_source ' ,
4845 ]
4946);
5047
51- $ table = ( new DbUtils ())-> getTableForItemType (Location::class) ;
48+ $ table = ' glpi_plugin_carbon_locations ' ;
5249$ migration ->addField (
5350 $ table ,
5451 'plugin_carbon_sources_zones_id ' ,
Original file line number Diff line number Diff line change 3232
3333use GlpiPlugin \Carbon \Install ;
3434
35- /** @var DbMysql $DB */
36- global $ DB ;
35+ /** @var Migration $migration */
36+ /** @var DBmysql $DB */
3737
38+ // Force immediate migration of this table to let the subsequent code work
39+ // with the up to date schema
3840$ rte_source = Install::getOrCreateSource ('RTE ' , 0 , 1 );
3941$ france_zone = Install::getOrCreateZone ('France ' , $ rte_source );
4042Install::linkSourceZone ($ rte_source , $ france_zone );
You can’t perform that action at this time.
0 commit comments