Fix DB schema and validations