Please also adapt the CREATE INDEX statements and add "type" before "code". Afterwards, execute a DROP INDEX statement after the corresponding ALTER TABLE statement.