You are viewing a plain text version of this content. The canonical link for it is here.
Posted to tashi-commits@incubator.apache.org by mr...@apache.org on 2009/07/08 18:36:15 UTC

svn commit: r792253 - /incubator/tashi/trunk/src/tashi/clustermanager/data/sql.py

Author: mryan3
Date: Wed Jul  8 18:36:15 2009
New Revision: 792253

URL: http://svn.apache.org/viewvc?rev=792253&view=rev
Log:
Patch from Jim Cipar on tashi-dev@i.a.o:

This script adds some default values to the host table in the SQL
backend.  This makes it easy to use a script to add lots of hosts at
once.


Modified:
    incubator/tashi/trunk/src/tashi/clustermanager/data/sql.py

Modified: incubator/tashi/trunk/src/tashi/clustermanager/data/sql.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/clustermanager/data/sql.py?rev=792253&r1=792252&r2=792253&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/clustermanager/data/sql.py (original)
+++ incubator/tashi/trunk/src/tashi/clustermanager/data/sql.py Wed Jul  8 18:36:15 2009
@@ -67,7 +67,7 @@
 	
 	def verifyStructure(self):
 		self.executeStatement("CREATE TABLE instances (id int(11) NOT NULL, vmId int(11), hostId int(11), decayed tinyint(1) NOT NULL, state int(11) NOT NULL, userId int(11), name varchar(256), cores int(11) NOT NULL, memory int(11) NOT NULL, disks varchar(1024) NOT NULL, nics varchar(1024) NOT NULL, hints varchar(1024) NOT NULL)")
-		self.executeStatement("CREATE TABLE hosts (id int(11) NOT NULL, name varchar(256) NOT NULL, up tinyint(1) NOT NULL, decayed tinyint(1) NOT NULL, state int(11) NOT NULL, memory int(11), cores int(11), version varchar(256))")
+		self.executeStatement("CREATE TABLE hosts (id INTEGER PRIMARY KEY, name varchar(256) NOT NULL, up tinyint(1) DEFAULT 0, decayed tinyint(1) DEFAULT 0, state int(11) DEFAULT 1, memory int(11), cores int(11), version varchar(256))")
 		self.executeStatement("CREATE TABLE networks (id int(11) NOT NULL, name varchar(256) NOT NULL)")
 		self.executeStatement("CREATE TABLE users (id int(11) NOT NULL, name varchar(256) NOT NULL)")