diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2020-09-10 13:35:36 +0530 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2020-09-10 13:35:36 +0530 |
commit | ee9dd0699794b60e4f1b421e23f9d5d7c497f049 (patch) | |
tree | ec9462abd2b10aa0da8c7b15d64fbb9cb7aba310 /tests/dbTestFiller.py | |
parent | 85555704cee850f2145ad5b2bc3afe66bfbd5e82 (diff) |
added automatic table craetion
Diffstat (limited to 'tests/dbTestFiller.py')
-rw-r--r-- | tests/dbTestFiller.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/dbTestFiller.py b/tests/dbTestFiller.py index 02d51de..6971553 100644 --- a/tests/dbTestFiller.py +++ b/tests/dbTestFiller.py @@ -10,6 +10,11 @@ mycon = con.connect(host=config['DATABASE']['HOST'],user=config['DATABASE']['USE mycursor = mycon.cursor() done = 1 +try: + mycursor.execute("create table curieweb ( id varchar(16) primary key, email nvarchar(255) NOT NULL, protein LONGBLOB NOT NULL, protein_name VARCHAR(255), ligand_pdbqt LONGBLOB, ligand_smile VARCHAR(255), ligand_name VARCHAR(255), config LONGBLOB NOT NULL, date DATE, description VARCHAR(255), done TINYINT DEFAULT 0, pdb VARCHAR(4),csv longblob)") +except con.ProgrammingError: + print("Table Already Exists!") + def convertToBinaryData(filename): with open(filename, 'rb') as file: binaryData = file.read() |