Fix convert database to unique

*Fix convert database to unique