Closed PhillipMwaniki closed 1 month ago
This already exists
You can use index
ex:
index(ColumnIndex.unique, 'email', ['email']);
Table code
Future<void> up() async {
super.up();
await createTable('users', () {
id();
string('email');
index(ColumnIndex.unique, 'email', ['email']);
});
}
Interesting. Thank you for the suggestion.
Is your feature request related to a problem? Please describe. When designing some tables i.e. a users table, I do need the email column, and other columns, say phone_number to be unique.
The present documentation for migration doesn't have this. We also don't have this in the code as I have tried.
Describe the solution you'd like I would like it be
Describe alternatives you've considered Another school of thought is using of class attributes
Additional context