Adding a uniqueness constraint to table column¶
Indexes can be used to enforce uniqueness of a column’s value, or the uniqueness of the combined values of more than one column.
To add a uniqueness constraint over a column of a table:
Open the API-Console and go to the
Datasection.Choose the
SQLsection in the left panel.Enter the SQL code to add a uniqueness constraint. For example, to add a uniqueness constraint over the
titlecolumn of thearticletable, the SQL statement will look like:CREATE UNIQUE INDEX ON article (title);
Check the
This is a migrationcheckbox so that the query is saved as a migrationHit
Run.
Was this page helpful?