
CREATE TABLE IF NOT EXISTS 'songs' (
'id' INTEGER NOT NULL,
'title' TEXT NOT NULL,
'lyrics' TEXT,
'author' TEXT,
'ccli' TEXT,
'audio' TEXT,
'vorder' TEXT,
'background' TEXT,
'backgroundType' TEXT,
horizontalTextAlignment TEXT,
verticalTextAlignment TEXT,
font TEXT,
fontSize INTEGER,
PRIMARY KEY(id)
);

CREATE TABLE IF NOT EXISTS 'videos' (
'id' INTEGER NOT NULL,
'title' TEXT NOT NULL,
'filePath' TEXT NOT NULL,
startTime REAL,
endTime REAL,
loop BOOLEAN NOT NULL DEFAULT 0,
PRIMARY KEY(id)
);

CREATE TABLE IF NOT EXISTS 'images' (
'id' INTEGER NOT NULL,
'title' TEXT NOT NULL,
'filePath' TEXT NOT NULL,
PRIMARY KEY(id)
);

CREATE TABLE IF NOT EXISTS 'presentations' (
'id' INTEGER NOT NULL,
'title' TEXT NOT NULL,
'filePath' TEXT NOT NULL,
pageCount INTEGER DEFAULT 1,
html BOOLEAN NOT NULL DEFAULT 0,
PRIMARY KEY(id)
);

ALTER TABLE songs
RENAME COLUMN horizontalTextAlignment TO horizontal_text_alignment;

ALTER TABLE songs
RENAME COLUMN verticalTextAlignment TO vertical_text_alignment;

ALTER TABLE songs
RENAME COLUMN vorder TO verse_order;

ALTER TABLE songs
RENAME COLUMN backgroundType TO background_type;

ALTER TABLE songs
RENAME COLUMN fontSize TO font_size;
