I am currently struggling with multiple primary keys with a forced mixed syntax. The script i am writing is supposed to duplicate a remote database but i need to add another primary key to the table.
The new key must be a "INTEGER AUTOINCREMENT"-Key.
The "CREATE TABLE"-Statement from the remote database looks currently like this:
CREATE TABLE "Table_1" (id text, ord text, mod_date TEXT, val TEXT, PRIMARY KEY (id,ord));
What i tried and failed with is following modification:
CREATE TABLE "Table_1" (_id INTEGER PRIMARY KEY AUTOINCREMENT, id text, ord text, mod_date TEXT, val TEXT, PRIMARY KEY (id,ord));
Is there a way to achieve this or do i have to write a function to unzip the "PRIMARY KEY(...)"-Part to be able to set the "PRIMARY KEY"-Statement for each primary key?