Say I have a table :employers and :employee. And I wanted to add the following:
ALTER TABLE employers ADD UNIQUE (employee_id); This worked fine in development but since there are already duplicate records in production, it is not working in production.
Is there a way to add sequence number of uniqueness constraint, i.e. impose uniqueness constraint on only new records?