added access_field to the notes_table

This commit is contained in:
bettina 2001-04-25 00:45:50 +00:00
parent 4ca386d64c
commit 3265e4a2d8
5 changed files with 55 additions and 15 deletions

View File

@ -323,12 +323,13 @@
$phpgw_setup->db->query($sql);
$sql = "CREATE TABLE phpgw_notes (
note_id int(20) NOT NULL auto_increment,
note_owner int(11),
note_date int(11),
note_category int(9),
note_content text,
PRIMARY KEY (note_id)
note_id int(20) NOT NULL auto_increment,
note_owner int(11),
note_access char(7),
note_date int(11),
note_category int(9),
note_content text,
PRIMARY KEY (note_id)
)";
$phpgw_setup->db->query($sql);
@ -348,8 +349,8 @@
)";
$phpgw_setup->db->query($sql);
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10';
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.001';
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
update_version_table();
// $phpgw_setup->update_version_table();
?>
?>

View File

@ -1469,6 +1469,16 @@
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10';
}
$test[] = '0.9.10';
function upgrade0_9_10()
{
global $phpgw_info,$phpgw_setup;
$phpgw_setup->db->query("alter table phpgw_notes add column note_access char(7) after note_owner");
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.001';
}
reset ($test);
while (list ($key, $value) = each ($test)){
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {

View File

@ -294,11 +294,12 @@
$phpgw_setup->db->query($sql);
$sql = "CREATE TABLE phpgw_notes (
note_id serial,
note_owner int,
note_date int,
note_category int,
note_content text
note_id serial,
note_owner int,
note_access char(7),
note_date int,
note_category int,
note_content text
)";
$phpgw_setup->db->query($sql);
@ -316,7 +317,7 @@
)";
$phpgw_setup->db->query($sql);
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10';
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.001';
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
update_version_table();
?>

View File

@ -1861,6 +1861,34 @@
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10';
}
$test[] = '0.9.10';
function upgrade0_9_10()
{
global $phpgw_info,$phpgw_setup;
$phpgw_setup->db->query("create table phpgw_temp as select * from notes",__LINE__,__FILE__);
$phpgw_setup->db->query("drop sequence notes_note_id_seq",__LINE__,__FILE__);
$phpgw_setup->db->query("drop table notes",__LINE__,__FILE__);
$sql = "CREATE TABLE phpgw_notes (
note_id serial,
note_owner int,
note_access char(7),
note_date int,
note_category int,
note_content text
)";
$phpgw_setup->db->query($sql);
$phpgw_setup->db->query("insert into phpgw_notes select * from phpgw_temp",__LINE__,__FILE__);
$phpgw_setup->db->query("drop table phpgw_temp",__LINE__,__FILE__);
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.001';
}
reset ($test);
while (list ($key, $value) = each ($test)){
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {

View File

@ -11,5 +11,5 @@
/* $Id$ */
$phpgw_info['server']['versions']['phpgwapi'] = '0.9.10';
$phpgw_info['server']['versions']['phpgwapi'] = '0.9.11.001';
$phpgw_info['server']['versions']['current_header'] = '1.11';