I am trying to move a database from MariaDB to SQLite. My MariaDB database dump contains:
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 executing this in SQLite I get:
OperationalError: near "KEY": syntax error
SQLite table-constraint documentation shows this chart:
How can I include these UNIQUE KEY
statements or are they not supported in SQLite? If not, what is the reason?
SQLite supports UNIQUE
but not UNIQUE KEY
. Nevertheless the result is the same. I need to remove the KEY
keyword from my dump to get the desired result.