mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 09:53:20 +01:00
Upgrade for adding table structure for calendar holidays
This commit is contained in:
parent
5cf7a13846
commit
ecf1d3bc66
@ -40,9 +40,10 @@
|
||||
$phpgw_setup->db->query("DROP TABLE phpgw_cal");
|
||||
$phpgw_setup->db->query("DROP TABLE phpgw_cal_user");
|
||||
$phpgw_setup->db->query("DROP TABLE phpgw_cal_repeats");
|
||||
$phpgw_setup->db->query("DROP TABLE calendar_entry");
|
||||
$phpgw_setup->db->query("DROP TABLE calendar_entry_user");
|
||||
$phpgw_setup->db->query("DROP TABLE calendar_entry_repeats");
|
||||
$phpgw_setup->db->query("DROP TABLE phpgw_cal_holidays");
|
||||
@$phpgw_setup->db->query("DROP TABLE calendar_entry");
|
||||
@$phpgw_setup->db->query("DROP TABLE calendar_entry_user");
|
||||
@$phpgw_setup->db->query("DROP TABLE calendar_entry_repeats");
|
||||
|
||||
/* Legacy tables */
|
||||
|
||||
|
@ -245,7 +245,15 @@
|
||||
)";
|
||||
$phpgw_setup->db->query($sql);
|
||||
|
||||
$sql = "CREATE TABLE newsgroups (
|
||||
$sql = "CREATE TABLE phpgw_cal_holidays (
|
||||
locale char(2) NOT NULL,
|
||||
name varchar(50) NOT NULL,
|
||||
date_time int(11) DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (locale,name)
|
||||
)";
|
||||
$phpgw_setup->db->query($sql);
|
||||
|
||||
$sql = "CREATE TABLE newsgroups (
|
||||
con int(11) NOT NULL auto_increment,
|
||||
name varchar(255) NOT NULL,
|
||||
messagecount int(11) NOT NULL,
|
||||
|
@ -1573,6 +1573,23 @@
|
||||
}
|
||||
|
||||
|
||||
$test[] = '0.9.11.003';
|
||||
function upgrade0_9_11_003()
|
||||
{
|
||||
global $phpgw_info,$phpgw_setup;
|
||||
|
||||
$sql = "CREATE TABLE phpgw_cal_holidays (
|
||||
locale char(2) NOT NULL,
|
||||
name varchar(50) NOT NULL,
|
||||
date_time int(11) DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (locale,name)
|
||||
)";
|
||||
$phpgw_setup->db->query($sql,__LINE__,__FILE__);
|
||||
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.004';
|
||||
}
|
||||
|
||||
|
||||
reset ($test);
|
||||
while (list ($key, $value) = each ($test)){
|
||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||
|
@ -35,6 +35,8 @@
|
||||
$phpgw_setup->db->query("DROP TABLE phpgw_cal");
|
||||
$phpgw_setup->db->query("DROP TABLE phpgw_cal_user");
|
||||
$phpgw_setup->db->query("DROP TABLE phpgw_cal_repeats");
|
||||
$phpgw_setup->db->query("DROP TABLE phpgw_cal_holidays");
|
||||
|
||||
$phpgw_setup->db->query("drop sequence phpgw_cal_cal_id_seq");
|
||||
$phpgw_setup->db->query("DROP TABLE phpgw_nextid");
|
||||
|
||||
@ -47,9 +49,9 @@
|
||||
$phpgw_setup->db->query("DROP TABLE phpgw_cal");
|
||||
$phpgw_setup->db->query("DROP TABLE phpgw_cal_user");
|
||||
$phpgw_setup->db->query("DROP TABLE phpgw_cal_repeats");
|
||||
$phpgw_setup->db->query("DROP TABLE calendar_entry");
|
||||
$phpgw_setup->db->query("DROP TABLE calendar_entry_user");
|
||||
$phpgw_setup->db->query("DROP TABLE calendar_entry_repeats");
|
||||
@$phpgw_setup->db->query("DROP TABLE calendar_entry");
|
||||
@$phpgw_setup->db->query("DROP TABLE calendar_entry_user");
|
||||
@$phpgw_setup->db->query("DROP TABLE calendar_entry_repeats");
|
||||
$phpgw_setup->db->query("DROP sequence phpgw_cal_id_seq");
|
||||
$phpgw_setup->db->query("drop sequence calendar_entry_cal_id_seq");
|
||||
|
||||
|
@ -218,6 +218,14 @@
|
||||
)";
|
||||
$phpgw_setup->db->query($sql);
|
||||
|
||||
$sql = "CREATE TABLE phpgw_cal_holidays (
|
||||
locale char(2) NOT NULL,
|
||||
name varchar(50) NOT NULL,
|
||||
date_time int4 DEFAULT 0 NOT NULL,
|
||||
PRIMARY KEY (locale,name)
|
||||
)";
|
||||
$phpgw_setup->db->query($sql);
|
||||
|
||||
$sql = "CREATE TABLE newsgroups (
|
||||
con serial,
|
||||
name varchar(255) NOT NULL,
|
||||
|
@ -2019,6 +2019,21 @@
|
||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.11.003";
|
||||
}
|
||||
|
||||
$test[] = '0.9.11.003';
|
||||
function upgrade0_9_11_003()
|
||||
{
|
||||
global $phpgw_info, $phpgw_setup;
|
||||
|
||||
$sql = "CREATE TABLE phpgw_cal_holidays (
|
||||
locale char(2) NOT NULL,
|
||||
name varchar(50) NOT NULL,
|
||||
date_time int4 DEFAULT 0 NOT NULL,
|
||||
PRIMARY KEY (locale,name)
|
||||
)";
|
||||
$phpgw_setup->db->query($sql);
|
||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.11.004";
|
||||
}
|
||||
|
||||
reset ($test);
|
||||
while (list ($key, $value) = each ($test)){
|
||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||
|
@ -11,5 +11,5 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info['server']['versions']['phpgwapi'] = '0.9.11.003';
|
||||
$phpgw_info['server']['versions']['phpgwapi'] = '0.9.11.004';
|
||||
$phpgw_info['server']['versions']['current_header'] = '1.11';
|
||||
|
Loading…
Reference in New Issue
Block a user