CREATE TABLE IF NOT EXISTS roles_adder ( server integer not null, role_a integer not null, role_b integer not null, role_c integer not null, PRIMARY KEY(server,role_a,role_b,role_c) ); CREATE INDEX IF NOT EXISTS index_roles_adder_server ON roles_adder (server); CREATE INDEX IF NOT EXISTS index_roles_adder_from ON roles_adder (role_a,role_b); CREATE INDEX IF NOT EXISTS index_roles_adder_to ON roles_adder (role_c); CREATE INDEX IF NOT EXISTS index_roles_adder_search ON roles_adder (server,role_a,role_b);