From 7ed08522b6b93f39c8f7ca4074e0cd66bc28d2f5 Mon Sep 17 00:00:00 2001 From: M Date: Thu, 19 Nov 2015 21:08:33 -0500 Subject: * Refactored stage table into new data model --- schema.sql | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/schema.sql b/schema.sql index 7bd2bf0..0867a75 100644 --- a/schema.sql +++ b/schema.sql @@ -45,7 +45,8 @@ CREATE TABLE `object` ( `type` enum( 'user', 'group', - 'pad' + 'pad', + 'stage' ) NOT NULL, PRIMARY KEY (`guid`) ); @@ -74,23 +75,14 @@ CREATE TABLE `user` ( DROP TABLE IF EXISTS `pad`; CREATE TABLE `pad` ( `guid` varchar(10) NOT NULL, - `stage` varchar(10) NOT NULL, + `stage` varchar(10) DEFAULT NULL, PRIMARY KEY (`guid`) ); - - -/* TODO -- WIP FROM HERE */ - +/* Stage objects - special attributes */ DROP TABLE IF EXISTS `stage`; CREATE TABLE `stage` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `guid` varchar(10) NOT NULL, - `owner` varchar(10) NOT NULL, - `perms` int(10) unsigned NOT NULL, - `name` varchar(50) NOT NULL, - `parent` varchar(10) NOT NULL, - /* TODO -- wip */ - - PRIMARY KEY (`id`) + `guid` varchar(10) NOT NULL, + `stage` varchar(10) DEFAULT NULL, + PRIMARY KEY (`guid`) ); -- cgit v1.2.3