dbPool->get('schema')); $builder->alterTable('billing_bill') ->addConstraint('billing_bill_stock_from', 'warehousemgmt_stocklocation', 'warehousemgmt_stocklocation_id') ->execute(); $builder = new Builder($app->dbPool->get('schema')); $builder->alterTable('billing_bill') ->addConstraint('billing_bill_stock_to', 'warehousemgmt_stocklocation', 'warehousemgmt_stocklocation_id') ->execute(); $mapper = \file_get_contents(__DIR__ . '/../../Models/BillMapper.php'); if ($mapper === false) { throw new \Exception('Couldn\'t parse mapper'); } // @todo removed until modular mapper extension is implemented // $mapper = \str_replace([ // '// @Module WarehouseManagement ', // '/* @Module WarehouseManagement ', // ' @Module WarehouseManagement */', // ], '', $mapper); // \file_put_contents(__DIR__ . '/../../Models/BillMapper.php', $mapper); Autoloader::invalidate(__DIR__ . '/../../Models/BillMapper.php'); } }