create or replace table accountcustomdata ( accountId int not null, customDataId int not null, constraint accountcustomdata_ibfk_1 foreign key (accountId) references accounts (id) ); create or replace index accountId on accountcustomdata (accountId);