create or replace table accountauth ( id int not null, accountId int not null, authKey varchar(128) not null, constraint accountauth_ibfk_1 foreign key (accountId) references accounts (id) ); create or replace index accountId on accountauth (accountId);