Author: jfthomps
Date: Thu Jun 2 20:22:44 2016
New Revision: 1746628
URL: http://svn.apache.org/viewvc?rev=1746628&view=rev
Log:
VCL-952 - API modifications to allow interaction via "VCL go" iOS app
vcl.sql:
-added definition for oneclick table
-added constraints for oneclick table
update-vcl.sql:
-added definition for oneclick table
-added constraints for oneclick table
Modified:
vcl/trunk/mysql/update-vcl.sql
vcl/trunk/mysql/vcl.sql
Modified: vcl/trunk/mysql/update-vcl.sql
URL:
http://svn.apache.org/viewvc/vcl/trunk/mysql/update-vcl.sql?rev=1746628&r1=1746627&r2=1746628&view=diff
==============================================================================
--- vcl/trunk/mysql/update-vcl.sql (original)
+++ vcl/trunk/mysql/update-vcl.sql Thu Jun 2 20:22:44 2016
@@ -1137,6 +1137,25 @@ CALL AddColumnIfNotExists('OS', 'minram'
-- --------------------------------------------------------
--
+-- Table structure for table `oneclick`
+--
+
+CREATE TABLE IF NOT EXISTS `oneclick` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `userid` mediumint(8) unsigned NOT NULL,
+ `imageid` smallint(5) unsigned NOT NULL,
+ `name` varchar(70) NOT NULL,
+ `duration` int(11) NOT NULL,
+ `autologin` tinyint(1) NOT NULL DEFAULT '0',
+ `status` tinyint(4) NOT NULL DEFAULT '1',
+ PRIMARY KEY (`id`),
+ KEY `userid` (`userid`),
+ KEY `imageid` (`imageid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+-- --------------------------------------------------------
+
+--
-- Table structure for table `openstackcomputermap`
--
@@ -2262,6 +2281,15 @@ CALL AddConstraintIfNotExists('natport',
-- --------------------------------------------------------
+--
+-- Constraints for table `oneclick`
+--
+
+CALL AddConstraintIfNotExists('oneclick', 'imageid', 'image', 'id', 'none',
'');
+CALL AddConstraintIfNotExists('oneclick', 'userid', 'user', 'id', 'none', '');
+
+-- --------------------------------------------------------
+
--
-- Constraints for table `openstackcomputermap`
--
Modified: vcl/trunk/mysql/vcl.sql
URL:
http://svn.apache.org/viewvc/vcl/trunk/mysql/vcl.sql?rev=1746628&r1=1746627&r2=1746628&view=diff
==============================================================================
--- vcl/trunk/mysql/vcl.sql (original)
+++ vcl/trunk/mysql/vcl.sql Thu Jun 2 20:22:44 2016
@@ -725,6 +725,25 @@ CREATE TABLE IF NOT EXISTS `natport` (
-- --------------------------------------------------------
--
+-- Table structure for table `oneclick`
+--
+
+CREATE TABLE IF NOT EXISTS `oneclick` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `userid` mediumint(8) unsigned NOT NULL,
+ `imageid` smallint(5) unsigned NOT NULL,
+ `name` varchar(70) NOT NULL,
+ `duration` int(11) NOT NULL,
+ `autologin` tinyint(1) NOT NULL DEFAULT '0',
+ `status` tinyint(4) NOT NULL DEFAULT '1',
+ PRIMARY KEY (`id`),
+ KEY `userid` (`userid`),
+ KEY `imageid` (`imageid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+-- --------------------------------------------------------
+
+--
-- Table structure for table `openstackcomputermap`
--
@@ -2369,6 +2388,12 @@ ALTER TABLE `natport` ADD CONSTRAINT FOR
ALTER TABLE `natport` ADD CONSTRAINT FOREIGN KEY (`nathostid`) REFERENCES
`nathost` (`id`) ON UPDATE CASCADE;
--
+-- Constraints for table `oneclick`
+--
+ALTER TABLE `oneclick` ADD CONSTRAINT FOREIGN KEY (`imageid`) REFERENCES
`image` (`id`);
+ALTER TABLE `oneclick` ADD CONSTRAINT FOREIGN KEY (`userid`) REFERENCES `user`
(`id`);
+
+--
-- Constraints for table `openstackcomputermap`
--
ALTER TABLE `openstackcomputermap` ADD CONSTRAINT FOREIGN KEY (`computerid`)
REFERENCES `computer` (`id`);