You can add the primary key attribute to the text without any problems. There is a big problem in your request above. You cannot apply the "AutoIncrement" attribute if your primary key consists of several columns.
- AUTOINCREMENT is not allowed if the primary key is above two or more columns
Here is an example of a query that creates a table with a primary key that consists of two columns, one column has the Integer data type, and the other has the text PRIMARY KEY ("col_1", "col_2")
.
CREATE TABLE "Table_Name" ("col_1" INTEGER NOT NULL , "col_2" TEXT NOT NULL , "col_3" TEXT, "col_4" VARCHAR, PRIMARY KEY ("col_1", "col_2"))
source share