diff options
Diffstat (limited to 'upgrades/dbpatches/1.3/postgresql/patch')
6 files changed, 8 insertions, 11 deletions
diff --git a/upgrades/dbpatches/1.3/postgresql/patch/actions.sql b/upgrades/dbpatches/1.3/postgresql/patch/actions.sql index 6a9c5778..ecec38df 100644 --- a/upgrades/dbpatches/1.3/postgresql/patch/actions.sql +++ b/upgrades/dbpatches/1.3/postgresql/patch/actions.sql @@ -4,8 +4,6 @@ CREATE TABLE actions_tmp ( subject varchar(255) DEFAULT '' NOT NULL, message text DEFAULT '' NOT NULL, recipient integer DEFAULT '0' NOT NULL, - maxrepeats integer DEFAULT '0' NOT NULL, - repeatdelay integer DEFAULT '600' NOT NULL, source integer DEFAULT '0' NOT NULL, actiontype integer DEFAULT '0' NOT NULL, evaltype integer DEFAULT '0' NOT NULL, @@ -14,6 +12,6 @@ CREATE TABLE actions_tmp ( PRIMARY KEY (actionid) ); -insert into actions_tmp select actionid,userid,subject,message,recipient,maxrepeats,repeatdelay,source,actiontype,0,status,scripts from actions; +insert into actions_tmp select actionid,userid,subject,message,recipient,source,actiontype,0,status,scripts from actions; drop table actions; alter table actions_tmp rename to actions; diff --git a/upgrades/dbpatches/1.3/postgresql/patch/alerts.sql b/upgrades/dbpatches/1.3/postgresql/patch/alerts.sql index 70cfd8ae..413e0ed0 100644 --- a/upgrades/dbpatches/1.3/postgresql/patch/alerts.sql +++ b/upgrades/dbpatches/1.3/postgresql/patch/alerts.sql @@ -11,10 +11,7 @@ CREATE TABLE alerts_tmp ( status integer DEFAULT '0' NOT NULL, retries integer DEFAULT '0' NOT NULL, error varchar(128) DEFAULT '' NOT NULL, - repeats integer DEFAULT '0' NOT NULL, - maxrepeats integer DEFAULT '0' NOT NULL, nextcheck integer DEFAULT '0' NOT NULL, - delay integer DEFAULT '0' NOT NULL, PRIMARY KEY (alertid) ); CREATE INDEX alerts_1 on alerts_tmp (actionid); @@ -24,6 +21,6 @@ CREATE INDEX alerts_4 on alerts_tmp (status,retries); CREATE INDEX alerts_5 on alerts_tmp (mediatypeid); CREATE INDEX alerts_6 on alerts_tmp (userid); -insert into alerts_tmp select * from alerts; +insert into alerts_tmp select alertid,actionid,triggerid,userid,clock,mediatypeid,sendto,subject,message,status,retries,error,nextcheck from alerts; drop table alerts; alter table alerts_tmp rename to alerts; diff --git a/upgrades/dbpatches/1.3/postgresql/patch/rights.sql b/upgrades/dbpatches/1.3/postgresql/patch/rights.sql index 9f3d6abf..19d72064 100644 --- a/upgrades/dbpatches/1.3/postgresql/patch/rights.sql +++ b/upgrades/dbpatches/1.3/postgresql/patch/rights.sql @@ -8,6 +8,6 @@ CREATE TABLE rights_tmp ( ); CREATE INDEX rights_1 on rights_tmp (groupid); -insert into rights_tmp select rightid,groupid,type::integer,permission,id from rights; +--insert into rights_tmp select rightid,groupid,type::integer,permission,id from rights; drop table rights; alter table rights_tmp rename to rights; diff --git a/upgrades/dbpatches/1.3/postgresql/patch/sysmaps.sql b/upgrades/dbpatches/1.3/postgresql/patch/sysmaps.sql index 7652219c..975530db 100644 --- a/upgrades/dbpatches/1.3/postgresql/patch/sysmaps.sql +++ b/upgrades/dbpatches/1.3/postgresql/patch/sysmaps.sql @@ -10,6 +10,6 @@ CREATE TABLE sysmaps_tmp ( ); CREATE INDEX sysmaps_1 on sysmaps_tmp (name); -insert into sysmaps_tmp select * from sysmaps; +insert into sysmaps_tmp select s.sysmapid,s.name,s.width,s.height,i.imageid,s.label_type,s.label_location from sysmaps s,images i where s.background=i.name; drop table sysmaps; alter table sysmaps_tmp rename to sysmaps; diff --git a/upgrades/dbpatches/1.3/postgresql/patch/sysmaps_elements.sql b/upgrades/dbpatches/1.3/postgresql/patch/sysmaps_elements.sql index 97fd7a8d..97c2e847 100644 --- a/upgrades/dbpatches/1.3/postgresql/patch/sysmaps_elements.sql +++ b/upgrades/dbpatches/1.3/postgresql/patch/sysmaps_elements.sql @@ -5,6 +5,7 @@ CREATE TABLE sysmaps_elements_tmp ( elementtype integer DEFAULT '0' NOT NULL, iconid_off bigint DEFAULT '0' NOT NULL, iconid_on bigint DEFAULT '0' NOT NULL, + iconid_unknown bigint DEFAULT '0' NOT NULL, label varchar(128) DEFAULT '' NOT NULL, label_location integer NULL, x integer DEFAULT '0' NOT NULL, @@ -13,6 +14,6 @@ CREATE TABLE sysmaps_elements_tmp ( PRIMARY KEY (selementid) ); -insert into sysmaps_elements_tmp select * from sysmaps_elements; +insert into sysmaps_elements_tmp select s.selementid,s.sysmapid,s.elementid,s.elementtype,i1.imageid,i2.imageid,i1.imageid,s.label,s.label_location,s.x,s.y,s.url from sysmaps_elements s,images i1,images i2 where s.icon=i1.name and s.icon_on=i2.name; drop table sysmaps_elements; alter table sysmaps_elements_tmp rename to sysmaps_elements; diff --git a/upgrades/dbpatches/1.3/postgresql/patch/users.sql b/upgrades/dbpatches/1.3/postgresql/patch/users.sql index ac094cfe..67c0bbe1 100644 --- a/upgrades/dbpatches/1.3/postgresql/patch/users.sql +++ b/upgrades/dbpatches/1.3/postgresql/patch/users.sql @@ -13,6 +13,7 @@ CREATE TABLE users_tmp ( ); CREATE INDEX users_1 on users_tmp (alias); -insert into users_tmp select userid,alias,name,surname,passwd,url,autologout,lang,refresh,3 from users; +insert into users_tmp select userid,alias,name,surname,passwd,url,autologout,lang,refresh,1 from users; +update users_tmp set type=3 where name='Admin'; drop table users; alter table users_tmp rename to users; |