I have a database schema file which I read in my Flask module.
PRAGMA foreign_keys = 1;
drop table if exists user;
create table user(uid integer primary key autoincrement,
username text not null,
password text not null,
email text not null);
drop table if exists asset;
create table asset(aid integer primary key autoincrement,
assetname text not null,
releasedate text,
FOREIGN_KEY(owner) REFERENCES user);
When I remove the foreign key field, it works fine.
Error trace:
File "main.py", line 75, in <module>
create_table()
File "main.py", line 30, in create_table
conn.cursor().executescript(f.read())
sqlite3.OperationalError: near "(": syntax error
I can post the method which uses this script but I don't think the problem lies there.

