Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to create a table with unique constraints. #112

Open
2 tasks
joemichels opened this issue Jun 29, 2019 · 1 comment
Open
2 tasks

A way to create a table with unique constraints. #112

joemichels opened this issue Jun 29, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@joemichels
Copy link

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

  • A way to identify and create columns with unique constraints.
  • There doesn't seem to be a way to do that with SwiftKueryORM.
@kilnerm
Copy link
Contributor

kilnerm commented Jul 3, 2019

@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.

@kilnerm kilnerm added the enhancement New feature or request label Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants