ALTER TABLE vn.duaInvoiceIn DROP KEY IF EXISTS duaFk_UNIQUE; ALTER TABLE vn.duaInvoiceIn DROP KEY IF EXISTS duaInvoiceIn_unique; ALTER TABLE vn.duaInvoiceIn ADD CONSTRAINT duaInvoiceIn_unique UNIQUE KEY (invoiceInFk);