Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Database creation script for One Act Records
CREATE TABLE `commonlinks` (
`releaseid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`formname` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`linkname` tinytext COLLATE utf8mb4_unicode_ci,
`linkref` text COLLATE utf8mb4_unicode_ci,
`linkdesc` text COLLATE utf8mb4_unicode_ci,
`linktech` text COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`releaseid`(100),`formname`(20))
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `freesecs` (
`releaseid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`secpos` tinyint(4) NOT NULL,
`seccontent` text COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`releaseid`(100),`secpos`)
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `hiddenrels` (
`releaseid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`releaseid`(100))
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `linkforms` (
`formname` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`formpos` int(11) NOT NULL,
`commname` text COLLATE utf8mb4_unicode_ci,
`commdesc` text COLLATE utf8mb4_unicode_ci,
`commtech` text COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`formname`(100)),
UNIQUE KEY `formpos` (`formpos`)
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `links` (
`releaseid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`linkpos` tinyint(3) unsigned NOT NULL,
`linkname` tinytext COLLATE utf8mb4_unicode_ci,
`linkref` text COLLATE utf8mb4_unicode_ci,
`linkdesc` text COLLATE utf8mb4_unicode_ci,
`linktech` text COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`releaseid`(100),`linkpos`)
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `releases` (
`releaseid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`releasename` text COLLATE utf8mb4_unicode_ci,
`releasedate` date NOT NULL,
`releasecover` text COLLATE utf8mb4_unicode_ci,
`releasedesc` text COLLATE utf8mb4_unicode_ci,
`releaseheader` text COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`releaseid`(100))
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sections` (
`releaseid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`secpos` tinyint(3) unsigned NOT NULL,
`sectitle` tinytext COLLATE utf8mb4_unicode_ci,
`sectemplate` tinytext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`releaseid`(100),`secpos`)
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `static` (
`stid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`stcontent` text COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`stid`(100))
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `staticsecs` (
`releaseid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`secpos` tinyint(4) NOT NULL,
`stid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`releaseid`(100),`secpos`)
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- For WIPA only
CREATE TABLE `wips` (
`wipcode` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`wipname` text COLLATE utf8mb4_unicode_ci,
`releaseid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`releasedate` date NOT NULL,
`wipref` text COLLATE utf8mb4_unicode_ci,
`wipdesc` text COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`wipcode`(100))
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment