|
49 | 49 | Time timestamp,
|
50 | 50 | UNIQUE (Speaker, Title) ON CONFLICT IGNORE)'''
|
51 | 51 |
|
| 52 | +# The SQLITE timestamp field corresponds to the DateTime object. The Date column in the database can be created from |
| 53 | +# a DateTime.date() call. |
52 | 54 | PRESENTATIONS_SCHEMA_310 = '''CREATE TABLE IF NOT EXISTS presentations
|
53 | 55 | (Id INTEGER PRIMARY KEY,
|
54 | 56 | Title varchar(255),
|
|
62 | 64 | EndTime timestamp,
|
63 | 65 | UNIQUE (Speaker, Title) ON CONFLICT IGNORE)'''
|
64 | 66 |
|
| 67 | +# TODO: Make PRESENTATIONS_SCHEMA_315 the default schema when the presentation table is created |
| 68 | +# TODO: Make an upgrade method from PRESENTATIONS_SCHEMA_310 to PRESENTATIONS_SCHEMA_315 |
| 69 | +# TODO: Update the SCHEMA_VERSION to 315 |
| 70 | +# TODO: Integrate new database scheme with importers/exporter functions |
| 71 | +# TODO: Force Presentation.Date to be a QDate |
| 72 | +# TODO: Figure out what the types should be for Presentation.StartTime/EndTime e.g. QTime |
| 73 | +# TODO: Enforce the default database values in the CSV/RSS importer |
| 74 | +# TODO: Enforce the default database values in Presentation.__init__ |
| 75 | +# TODO: Enforce the default database values in db.insert_presentation() |
| 76 | +# TODO: Check what format the csv and rss sample files are in. For instance, do the rss files use 'None' instead of '' |
| 77 | +# for missing fields? |
| 78 | +# TODO: Update _helper_presentation_exists() and get_presentation_id() to use the new schema such that they no longer |
| 79 | +# check if the stored data values are NULL |
| 80 | +PRESENTATIONS_SCHEMA_315 = '''CREATE TABLE IF NOT EXISTS presentations |
| 81 | + (Id INTEGER PRIMARY KEY, |
| 82 | + Title varchar(255) NOT NULL DEFAULT '', |
| 83 | + Speaker varchar(100) NOT NULL DEFAULT '', |
| 84 | + Description text NOT NULL DEFAULT '', |
| 85 | + Category varchar(25) NOT NULL DEFAULT '', |
| 86 | + Event varchar(100) NOT NULL DEFAULT '', |
| 87 | + Room varchar(25) NOT NULL DEFAULT '', |
| 88 | + Date timestamp NOT NULL DEFAULT '', |
| 89 | + StartTime timestamp NOT NULL DEFAULT '', |
| 90 | + EndTime timestamp NOT NULL DEFAULT '', |
| 91 | + UNIQUE (Speaker, Title, Event) ON CONFLICT IGNORE)''' |
| 92 | + |
65 | 93 | REPORTS_SCHEMA_300 = '''CREATE TABLE IF NOT EXISTS failures
|
66 | 94 | (Id INTERGER PRIMARY KEY,
|
67 | 95 | Comments TEXT,
|
68 | 96 | Indicator TEXT,
|
69 | 97 | Release INTEGER,
|
70 | 98 | UNIQUE (ID) ON CONFLICT REPLACE)'''
|
71 | 99 |
|
| 100 | +# TODO: Ensure that the CSV/RSS to presentation importers are done using the same conventions. For instance, convert a |
| 101 | +# room with value None to '' in both the csv and rss importer. Instead of the csv parser converting None to 'None' |
| 102 | +# and the rss importer doing something else etcetera. |
| 103 | + |
72 | 104 |
|
73 | 105 | class QtDBConnector(object):
|
74 | 106 | def __init__(self, db_filepath, plugman):
|
|
0 commit comments