Skip to content
This repository has been archived by the owner on May 28, 2022. It is now read-only.

Commit

Permalink
Removed new database scheme, refactored it into #680
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Romansky committed Dec 18, 2014
1 parent 67b267a commit cd44e5c
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/freeseer/framework/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
Time timestamp,
UNIQUE (Speaker, Title) ON CONFLICT IGNORE)'''

# The SQLITE timestamp field corresponds to the DateTime object. The Date column in the database can be created from
# a DateTime.date() call.
PRESENTATIONS_SCHEMA_310 = '''CREATE TABLE IF NOT EXISTS presentations
(Id INTEGER PRIMARY KEY,
Title varchar(255),
Expand All @@ -63,41 +61,13 @@
EndTime timestamp,
UNIQUE (Speaker, Title) ON CONFLICT IGNORE)'''

# TODO: Fix the ON CONFLICT clause
# TODO: Force the Date to be QDate
# TODO: Figure out what the types should be for StartTime/EndTime e.g. QTime
# TODO: Enforce the default database values in the CSV/RSS importer
# TODO: Enforce the default database values in Presentation.__init__
# TODO: Enforce the default database values in db.insert_presentation()
# TODO: Check what format the csv and rss sample files are in. For instance, do the rss files use 'None' instead of ''
# for missing fields?
# TODO: Update _helper_presentation_exists() and get_presentation_id() to use the new schema such that they no longer
# check if the stored data values are NULL
PRESENTATIONS_SCHEMA_315 = '''CREATE TABLE IF NOT EXISTS presentations
(Id INTEGER PRIMARY KEY,
Title varchar(255) NOT NULL DEFAULT '',
Speaker varchar(100) NOT NULL DEFAULT '',
Description text NOT NULL DEFAULT '',
Category varchar(25) NOT NULL DEFAULT '',
Event varchar(100) NOT NULL DEFAULT '',
Room varchar(25) NOT NULL DEFAULT '',
Date timestamp NOT NULL DEFAULT '',
StartTime timestamp NOT NULL DEFAULT '',
EndTime timestamp NOT NULL DEFAULT '',
UNIQUE (Speaker, Title) ON CONFLICT IGNORE)'''

REPORTS_SCHEMA_300 = '''CREATE TABLE IF NOT EXISTS failures
(Id INTERGER PRIMARY KEY,
Comments TEXT,
Indicator TEXT,
Release INTEGER,
UNIQUE (ID) ON CONFLICT REPLACE)'''

# TODO: Ensure that the CSV/RSS to presentation importers are done using the same conventions. For instance, convert a
# room with value None to '' in both the csv and rss importer. Instead of the csv parser converting None to 'None'
# and the rss importer doing something else etcetera.


class QtDBConnector(object):
def __init__(self, db_filepath, plugman):
"""
Expand Down

0 comments on commit cd44e5c

Please sign in to comment.