-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path12.sql
13 lines (13 loc) · 914 Bytes
/
12.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
BEGIN TRANSACTION ;
create table historynew(msgid integer primary key,origid integer,threadid integer,chanid integer,guildid integer,authid integer,otherid integer,proxid text,maskid text);
insert into historynew select msgid,NULL,threadid,chanid,NULL,authid,otherid,proxid,maskid from history;
drop table history;
alter table historynew rename to history;
alter table proxies add column created integer;
alter table proxies add column msgcount integer;
update proxies set (created, msgcount) = (NULL, NULL);
create table masksnew(maskid text collate nocase,guildid integer,roleid integer,nick text,avatar text,color text,type integer,created integer,updated integer,msgcount integer,unique(maskid, guildid),unique(guildid, roleid));
insert into masksnew select maskid,guildid,roleid,nick,avatar,color,type,NULL,updated,NULL from masks;
drop table masks;
alter table masksnew rename to masks;
COMMIT TRANSACTION ;