I am trying to move a db from mariadb to SQlite. I have created a dump-file out of the mariadb, which contains statements like the following example below:
CREATE TABLE IF NOT EXISTS Persons (PersonID int,name varchar(255),
LastName varchar(255), FirstName varchar(255), Address varchar(255),
City varchar(255),UNIQUE KEY `ID1234567` (`name`))
When trying to execute the statement on my SQLite database, I always get an
OperationalError: near "KEY": syntax error
My question is, does SQLite support statements of that kind? or do I need to filter them out?
The website of SQLite shows this chart.
is there any way to include these UNIQUE KEY
-statements or are they completely not supported in sqlite? If not, what is the reason for this?
As I learned from the Comments, SQLite supports UNIQUE
but not UNIQUE KEY
. Nevertheless the result is the same. That means I need to filter out the KEY
-Keyword from my dump, and will get the desired result.