conn = sqlite3.connect(':memory:')
c = conn.cursor()
try:
    c.execute('ALTER TABLE mytable ADD COLUMN newcolumn;')
except:
    pass
c.close()
ALTER TABLE Sqlite: how to check if a column exists before alter the table?