Open joemichels opened 5 years ago
@joemichels Currently if you want constraints like this on tables related to your models you would need to create your table through the SwiftKuery API.
I agree that having some means to describe these constraints within the Model declaration would be helpful so will move this onto the backlog for consideration in the future.
Context and Description
It would be handy to identify what columns should have the Unique Constraint at the time of the table creation.
As an example:
var uniqueColumns:[ String] = ["email", "identifierForVendor"]
createTableSync(using db: Database?, uniqueColumnNames: uniqueColumns)
There may be a vastly better way of doing this or a way already, but I hope you understand the need I would like to have.
Environment Details
MacOS 10.14, Xcode 10.2
Expected vs. Actual Behaviour