1-- Add the type (ie http or id)
2alter table REDIRECTIONS_LOG add column METHOD TEXT;
3
4-- Rename redirection to page rules
5create table PAGE_RULES_tmp
6(
7    ID                 INTEGER PRIMARY KEY,
8    MATCHER            TEXT unique NOT NULL, -- the matcher pattern
9    TARGET             TEXT NOT NULL,        -- the target
10    PRIORITY           INTEGER NOT NULL,     -- the priority in which the match must be performed
11    TIMESTAMP          TIMESTAMP  NOT NULL  -- a update/create timestamp
12);
13
14insert into PAGE_RULES_tmp(ID, MATCHER, TARGET, PRIORITY, TIMESTAMP)
15select NULL, SOURCE, TARGET, 1, CREATION_TIMESTAMP
16from REDIRECTIONS;
17drop table REDIRECTIONS;
18alter table PAGE_RULES_tmp rename to PAGE_RULES;
19
20
21