Archived
4
2

Add database creation scripts for sqlite old HPR schema

This commit is contained in:
Roan Horning 2022-07-07 12:56:56 -04:00
parent c8dfd14fb4
commit e86bb8427e
Signed by: rho_n
GPG Key ID: 234AEF20B72D5769
5 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,4 @@
.read Create_Table_miniseries.sql
.read Create_Table_licenses.sql
.read Create_Table_hosts.sql
.read Create_Table_eps.sql

View File

@ -0,0 +1,16 @@
CREATE TABLE eps (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
date DATE NOT NULL,
title VARCHAR(100) NOT NULL,
duration INTEGER NOT NULL,
summary VARCHAR(100) NOT NULL,
notes TEXT NOT NULL,
hostid INTEGER NOT NULL,
series INTEGER NOT NULL,
explicit INTEGER DEFAULT 1 NOT NULL,
license VARCHAR(11) DEFAULT 'CC-BY-SA' NOT NULL,
tags VARCHAR(200) NOT NULL,
version INTEGER DEFAULT 0 NOT NULL,
downloads INTEGER NOT NULL,
valid INTEGER NOT NULL
);

View File

@ -0,0 +1,12 @@
-- hosts definition
CREATE TABLE hosts (
hostid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
host TEXT NOT NULL,
email TEXT NOT NULL,
profile TEXT NOT NULL,
license VARCHAR(11) DEFAULT 'CC-BY-SA',
local_image INTEGER DEFAULT 0 NOT NULL,
gpg TEXT NOT NULL,
espeak_name TEXT
);

View File

@ -0,0 +1,8 @@
-- licenses definition
CREATE TABLE licenses (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
short_name VARCHAR(11) NOT NULL,
long_name VARCHAR(40) NOT NULL,
url VARCHAR(80) NOT NULL
);

View File

@ -0,0 +1,10 @@
-- miniseries definition
CREATE TABLE miniseries (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
name VARCHAR(100) NOT NULL,
description TEXT NOT NULL,
private INTEGER NOT NULL,
image TEXT NOT NULL,
valid INTEGER DEFAULT 1 NOT NULL
);