TABLE_QUERY = """(query_id INTEGER PRIMARY KEY,user UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',name UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT 'query',query UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '') """
TABLE_REF = """ (Id INTEGER PRIMARY KEY,Identifier UNICODE UNIQUE,BibliographicType INTEGER NOT NULL ON CONFLICT REPLACE DEFAULT 0,Address UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Annote UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Author UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Booktitle UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Chapter UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Edition UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Editor UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Howpublished UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Institution UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Journal UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Month UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Note UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Number UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Organizations UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Pages UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Publisher UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',School UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Series UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Title UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Report_Type UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Volume UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Year UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',URL UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Custom1 UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Custom2 UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Custom3 UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Custom4 UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Custom5 UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',ISBN UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Abstract UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '') """
TABLE_KEY = """ (user unicode NOT NULL ON CONFLICT REPLACE DEFAULT '',key_Id INTEGER PRIMARY KEY,parent INTEGER,key_name UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT 'newkey') """
TABLE_LINK = """ (key_Id INTEGER,ref_Id INTEGER,UNIQUE (key_Id,ref_Id)) """
TABLE_MODIF = """(ref_Id INTEGER,creator UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',date REAL NOT NULL ON CONFLICT REPLACE DEFAULT 0,user_modif UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',date_modif REAL NOT NULL ON CONFLICT REPLACE DEFAULT 0,UNIQUE (ref_Id))"""
TABLE_FILE = """(ref_Id INTEGER, path UNICODE NOT NULL)"""

TMPTABLE_REF = """ (Id INTEGER PRIMARY KEY,Identifier UNICODE,BibliographicType INTEGER NOT NULL ON CONFLICT REPLACE DEFAULT 0,Address UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Annote UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Author UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Booktitle UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Chapter UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Edition UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Editor UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Howpublished UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Institution UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Journal UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Month UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Note UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Number UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Organizations UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Pages UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Publisher UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',School UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Series UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Title UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Report_Type UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Volume UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Year UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',URL UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Custom1 UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Custom2 UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Custom3 UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Custom4 UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Custom5 UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',ISBN UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '',Abstract UNICODE NOT NULL ON CONFLICT REPLACE DEFAULT '') """
