Files
twitterboard/db_changes/v01.py
Julien Lengrand-Lambert 01e128f494 Adds a new column to tweets in db : invalid
Will be used to set problematic as crawled and try to correct them later on. This avoids having to process them over and over.

I might have to think about a better way to perform database updates if I do it often.
2013-01-10 10:35:41 +01:00

17 lines
368 B
Python

"""
Changes made between v00 and v01
Operation is :
- Add new column of type boolean and name invalid in Tweet table
"""
import sqlite3
db_name = '/home/jll/Documents/code/twitterboard/twiderboard.db'
con = sqlite3.connect(db_name)
c = con.cursor()
c.execute("ALTER TABLE tweets ADD COLUMN 'invalid' BOOLEAN")
con.commit()
c.close()
print "database updated to v01"