Commit 1d405391 authored by Julian Rother's avatar Julian Rother
Browse files

Extended db schema to support video remuxing/encoding

parent 492e0238
...@@ -63,7 +63,10 @@ CREATE TABLE IF NOT EXISTS `courses_data` ( ...@@ -63,7 +63,10 @@ CREATE TABLE IF NOT EXISTS `courses_data` (
`responsible` text NOT NULL DEFAULT '', `responsible` text NOT NULL DEFAULT '',
`feed_url` text NOT NULL DEFAULT '', `feed_url` text NOT NULL DEFAULT '',
`external` INTEGER NOT NULL DEFAULT 0, `external` INTEGER NOT NULL DEFAULT 0,
`coursechapters` INTEGER NOT NULL DEFAULT 0 `coursechapters` INTEGER NOT NULL DEFAULT 0,
`autopublish` INTEGER NOT NULL DEFAULT 0,
`autovisible` INTEGER NOT NULL DEFAULT 0,
`profile` varchar(64) NOT NULL DEFAULT 'default'
); );
CREATE TABLE IF NOT EXISTS `filesizes` ( CREATE TABLE IF NOT EXISTS `filesizes` (
`path` varchar(255) NOT NULL PRIMARY KEY, `path` varchar(255) NOT NULL PRIMARY KEY,
...@@ -79,7 +82,8 @@ CREATE TABLE IF NOT EXISTS `formats` ( ...@@ -79,7 +82,8 @@ CREATE TABLE IF NOT EXISTS `formats` (
`aspect` varchar(16) NOT NULL, `aspect` varchar(16) NOT NULL,
`prio` INTEGER NOT NULL DEFAULT '0', `prio` INTEGER NOT NULL DEFAULT '0',
`player_prio` INTEGER NOT NULL DEFAULT '0', `player_prio` INTEGER NOT NULL DEFAULT '0',
`mimetype` varchar(32) NOT NULL `mimetype` varchar(32) NOT NULL,
`options` text
); );
CREATE TABLE IF NOT EXISTS `lectures_data` ( CREATE TABLE IF NOT EXISTS `lectures_data` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
...@@ -101,7 +105,8 @@ CREATE TABLE IF NOT EXISTS `lectures_data` ( ...@@ -101,7 +105,8 @@ CREATE TABLE IF NOT EXISTS `lectures_data` (
`jumplist` text NOT NULL DEFAULT '', `jumplist` text NOT NULL DEFAULT '',
`titlefile` varchar(255) NOT NULL DEFAULT '', `titlefile` varchar(255) NOT NULL DEFAULT '',
`live` INTEGER NOT NULL DEFAULT 0, `live` INTEGER NOT NULL DEFAULT 0,
`norecording` INTEGER NOT NULL DEFAULT 0 `norecording` INTEGER NOT NULL DEFAULT 0,
`profile` varchar(64)
); );
CREATE TABLE IF NOT EXISTS `places` ( CREATE TABLE IF NOT EXISTS `places` (
`place` varchar(20) NOT NULL PRIMARY KEY, `place` varchar(20) NOT NULL PRIMARY KEY,
...@@ -129,6 +134,13 @@ CREATE TABLE IF NOT EXISTS `site_texts` ( ...@@ -129,6 +134,13 @@ CREATE TABLE IF NOT EXISTS `site_texts` (
`modified_when` datetime NOT NULL, `modified_when` datetime NOT NULL,
`modified_by` text NOT NULL `modified_by` text NOT NULL
); );
CREATE TABLE IF NOT EXISTS `sources` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`lecture_id` INTEGER NOT NULL,
`path` text NOT NULL,
`profile` text NOT NULL,
`hash` varchar(32) NOT NULL
);
CREATE TABLE IF NOT EXISTS `log` ( CREATE TABLE IF NOT EXISTS `log` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`time` datetime NOT NULL, `time` datetime NOT NULL,
...@@ -151,6 +163,11 @@ CREATE TABLE IF NOT EXISTS `logcache` ( ...@@ -151,6 +163,11 @@ CREATE TABLE IF NOT EXISTS `logcache` (
`date` datetime NOT NULL, `date` datetime NOT NULL,
`value` INTEGER `value` INTEGER
); );
CREATE TABLE IF NOT EXISTS `profiles` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`name` varchar(64) NOT NULL,
`format` INTEGER NOT NULL
);
CREATE TABLE IF NOT EXISTS `streams` ( CREATE TABLE IF NOT EXISTS `streams` (
`handle` varchar(32) NOT NULL PRIMARY KEY, `handle` varchar(32) NOT NULL PRIMARY KEY,
`active` INTEGER NOT NULL, `active` INTEGER NOT NULL,
...@@ -204,7 +221,8 @@ CREATE TABLE IF NOT EXISTS `videos_data` ( ...@@ -204,7 +221,8 @@ CREATE TABLE IF NOT EXISTS `videos_data` (
`created_by` INTEGER NOT NULL, `created_by` INTEGER NOT NULL,
`file_size` bigINTEGER NOT NULL DEFAULT '-1', `file_size` bigINTEGER NOT NULL DEFAULT '-1',
`video_format` INTEGER NOT NULL, `video_format` INTEGER NOT NULL,
`hash` varchar(32) NOT NULL `hash` varchar(32) NOT NULL,
`source` INTEGER
); );
CREATE TABLE IF NOT EXISTS `announcements` ( CREATE TABLE IF NOT EXISTS `announcements` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment