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

Construct a new database schema for the presentation table that better handles timestamps #667

@SRomansky

Description

@SRomansky

The current database schema:

PRESENTATIONS_SCHEMA_310 = '''CREATE TABLE IF NOT EXISTS presentations                                                                                                                           
                                       (Id INTEGER PRIMARY KEY,                                                                                                                                  
                                        Title varchar(255),                                                                                                                                      
                                        Speaker varchar(100),                                                                                                                                    
                                        Description text,                                                                                                                                        
                                        Category varchar(25),                                                                                                                                    
                                        Event varchar(100),                                                                                                                                      
                                        Room varchar(25),                                                                                                                                        
                                        Date timestamp,                                                                                                                                          
                                        StartTime timestamp,                                                                                                                                     
                                        EndTime timestamp,                                                                                                                                       
                                        UNIQUE (Speaker, Title) ON CONFLICT IGNORE)'''

Does not describe the Date, StartTime, or Endtime that Freeseer expects. It would be useful to have a well defined meaning for what each field is supposed to contain.

Some of the current code in Freeseer expects dates of the format 2010-05-14T10:45 and has resulted in the following code being added:

    if not presentation.date and presentation.startTime and len(presentation.startTime) == 16:
            presentation.date, presentation.startTime = presentation.startTime[:-6], presentation.startTime[11:]

Such code would need to be refactored when a new schema was implemented. The above code also uses the same timestamp format for the presentation.date and presentation.startTime fields.

Related #634, #619, #484

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions