updated structure sql