-
Notifications
You must be signed in to change notification settings - Fork 24
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
How to create unique index? #210
Comments
Hi there, unfortunately not using the schema definition API. Under the hood PowerSync creates views using the client schema definition which is why you are getting that error. Are you looking to create unique indexes before enabling sync with a backend database (e.g. in a use case similar to our optional sync demo)? Or do you want to add it for a |
i already created local table with schema command
with command |
If you're not syncing these queries at all, I'd recommend just creating a standard SQLite table for that. The PowerSyncDatabase is a standard SQLite database, so you can do pretty-much anything you can with normal SQLite. You can see an example of creating tables using migrations here: |
@rkistner @kobiebotha thank you, i will do that with migrations |
Hi
Is there a way to create UNIQUE index on some table's field?
When i try to create unique index with
execute
mehod i've receiveSqliteException(1): while preparing statement, views may not be indexed, SQL logic error (code 1)
The text was updated successfully, but these errors were encountered: