Fix DB scripts