3 $root_dir = dirname(dirname(dirname(dirname(__FILE__))));
5 require_once $root_dir.
'/core/include/init.inc';
7 $GLOBALS[
'SQ_SYSTEM']->changeDatabaseConnection(
'db2');
9 if ($dbType ==
'pgsql') {
19 }
catch (Exception $e) {
36 foreach ($products as $product) {
37 $suiteid = array_get_index($product,
'suiteid', NULL);
38 $connection = array_get_index($product,
'connection', NULL);
39 if ($suiteid === NULL || $connection === NULL) {
43 $connection = @unserialize($connection);
44 if ($connection === FALSE) {
48 $url = array_get_index($connection,
'url', NULL);
53 unset($connection[
'url']);
66 MatrixDAL::executeSql(
'ALTER TABLE ONLY sq_suite_product ADD CONSTRAINT suite_product_pk PRIMARY KEY (suiteid)');
67 MatrixDAL::executeSql(
'CREATE INDEX sq_suite_product_type ON sq_suite_product (systemid, type, status)');
76 if (empty($sequence)) {
92 foreach ($products as $product) {
93 $suiteid = array_get_index($product,
'suiteid', NULL);
94 $connection = array_get_index($product,
'connection', NULL);
95 if ($suiteid === NULL || $connection === NULL) {
99 $connection = @unserialize($connection);
100 if ($connection === FALSE) {
104 $url = array_get_index($connection,
'url', NULL);
109 unset($connection[
'url']);
122 MatrixDAL::executeSql(
'ALTER TABLE sq_suite_product ADD CONSTRAINT suite_product_pk PRIMARY KEY (suiteid)');
123 MatrixDAL::executeSql(
'CREATE INDEX sq_suite_product_type ON sq_suite_product (systemid, type, status)');
125 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();