fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [13177] fix install and keep in sync with next versio


From: Sigurd Nes
Subject: [Fmsystem-commits] [13177] fix install and keep in sync with next version
Date: Sat, 09 May 2015 17:49:22 +0000

Revision: 13177
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13177
Author:   sigurdne
Date:     2015-05-09 17:49:21 +0000 (Sat, 09 May 2015)
Log Message:
-----------
fix install and keep in sync with next version

Modified Paths:
--------------
    trunk/property/setup/default_records.inc.php
    trunk/property/setup/setup.inc.php
    trunk/property/setup/tables_current.inc.php
    trunk/property/setup/tables_update.inc.php

Modified: trunk/property/setup/default_records.inc.php
===================================================================
--- trunk/property/setup/default_records.inc.php        2015-05-08 23:00:41 UTC 
(rev 13176)
+++ trunk/property/setup/default_records.inc.php        2015-05-09 17:49:21 UTC 
(rev 13177)
@@ -302,8 +302,8 @@
 #
 #  fm_ns3420
 #
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_ns3420 (id, tekst1, 
enhet) VALUES ('D00', 'RIGGING, KLARGJØRING', 'RS')");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_ns3420 (id, tekst1, 
enhet,tekst2) VALUES ('D20', 'RIGGING, ANLEGGSTOMT', 'RS','TILFØRSEL- OG 
FORSYNINGSANLEGG')");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_ns3420 (id, num, tekst1, 
enhet) VALUES (1, 'D00', 'RIGGING, KLARGJØRING', 'RS')");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_ns3420 (id, num, tekst1, 
enhet,tekst2) VALUES (2, 'D20', 'RIGGING, ANLEGGSTOMT', 'RS','TILFØRSEL- OG 
FORSYNINGSANLEGG')");
 
 #
 # Data-ark for tabell fm_idgenerator

Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php  2015-05-08 23:00:41 UTC (rev 13176)
+++ trunk/property/setup/setup.inc.php  2015-05-09 17:49:21 UTC (rev 13177)
@@ -12,7 +12,7 @@
        */
 
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.688';
+       $setup_info['property']['version']              = '0.9.17.689';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';
@@ -212,7 +212,8 @@
                'fm_jasper_format_type',
                'fm_jasper_input',
                'fm_custom_menu_items',
-               'fm_regulations'
+               'fm_regulations',
+               'fm_generic_history'
        );
 
        /* The hooks this app includes, needed for hooks registration */

Modified: trunk/property/setup/tables_current.inc.php
===================================================================
--- trunk/property/setup/tables_current.inc.php 2015-05-08 23:00:41 UTC (rev 
13176)
+++ trunk/property/setup/tables_current.inc.php 2015-05-09 17:49:21 UTC (rev 
13177)
@@ -997,7 +997,7 @@
                        'pk' => array('id'),
                        'fk' => array(),
                        'ix' => array(),
-                       'uc' => array('name')
+                       'uc' => array('num')
                ),
                'fm_tts_status' => array(
                        'fd' => array(
@@ -1865,6 +1865,24 @@
                        'ix' => array(),
                        'uc' => array()
                ),
+               'fm_generic_history' => array(
+                       'fd' => array(
+                               'history_id' => array('type' => 
'auto','precision' => '4','nullable' => False),
+                               'history_record_id' => array('type' => 
'int','precision' => '4','nullable' => False),
+                               'history_owner' => array('type' => 
'int','precision' => '4','nullable' => False),
+                               'history_status' => array('type' => 
'char','precision' => '2','nullable' => False),
+                               'history_new_value' => array('type' => 
'text','nullable' => False),
+                               'history_old_value' => array('type' => 
'text','nullable' => true),
+                               'history_timestamp' => array('type' => 
'timestamp','nullable' => False,'default' => 'current_timestamp'),
+                               'history_attrib_id' => array('type' => 
'int','precision' => '4','nullable' => False),
+                               'location_id' => array('type' => 
'int','precision' => '4','nullable' => False),
+                               'app_id' => array('type' => 'int','precision' 
=> '4','nullable' => False),
+                       ),
+                       'pk' => array('history_id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               ),
                'fm_owner' => array(
                        'fd' => array(
                                'id' => array('type' => 'int','precision' => 
'4','nullable' => False),

Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php  2015-05-08 23:00:41 UTC (rev 
13176)
+++ trunk/property/setup/tables_update.inc.php  2015-05-09 17:49:21 UTC (rev 
13177)
@@ -7852,7 +7852,7 @@
        {
                $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
 
-               $GLOBALS['phpgw_setup']->oProc->query("ALTER TABLE fm_budget 
DROP CONSTRAINT fm_budget_year_key");
+               $GLOBALS['phpgw_setup']->oProc->query("ALTER TABLE fm_budget 
DROP CONSTRAINT fm_budget_year_b_account_id_district_id_revision_key");
                $GLOBALS['phpgw_setup']->oProc->query("ALTER TABLE fm_budget 
ADD CONSTRAINT fm_budget_year_key UNIQUE(year , b_account_id , district_id , 
revision, ecodimb ,category)");
 
                
$GLOBALS['phpgw_setup']->oProc->AlterColumn('fm_department','name', 
array('type' => 'varchar','precision' => '200','nullable' => False));
@@ -8328,3 +8328,39 @@
                        return $GLOBALS['setup_info']['property']['currentver'];
                }
        }
+       /**
+       * Update property version from 0.9.17.687 to 0.9.17.688
+       * Add generic history
+       */
+       $test[] = '0.9.17.688';
+       function property_upgrade0_9_17_688()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+                       'fm_generic_history', array(
+                               'fd' => array(
+                                       'history_id' => array('type' => 
'auto','precision' => '4','nullable' => False),
+                                       'history_record_id' => array('type' => 
'int','precision' => '4','nullable' => False),
+                                       'history_owner' => array('type' => 
'int','precision' => '4','nullable' => False),
+                                       'history_status' => array('type' => 
'char','precision' => '2','nullable' => False),
+                                       'history_new_value' => array('type' => 
'text','nullable' => False),
+                                       'history_old_value' => array('type' => 
'text','nullable' => true),
+                                       'history_timestamp' => array('type' => 
'timestamp','nullable' => False,'default' => 'current_timestamp'),
+                                       'history_attrib_id' => array('type' => 
'int','precision' => '4','nullable' => False),
+                                       'location_id' => array('type' => 
'int','precision' => '4','nullable' => False),
+                                       'app_id' => array('type' => 
'int','precision' => '4','nullable' => False),
+                               ),
+                               'pk' => array('history_id'),
+                               'fk' => array(),
+                               'ix' => array(),
+                               'uc' => array()
+                       )
+               );
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.689';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]