summaryrefslogtreecommitdiff
path: root/database/schema.sql
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-25 10:45:22 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-25 10:45:22 +0200
commitd85c1233dab14a9239646410d76ca35ed1cd0665 (patch)
treed43d265c732497e98f5b9c57fda4a3157c4b9a57 /database/schema.sql
parent2ab2f88c4353207f7b99cd77bc478502610f2e9e (diff)
Fix issue with rack creation
Diffstat (limited to 'database/schema.sql')
-rw-r--r--database/schema.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/database/schema.sql b/database/schema.sql
index 0dc27afe..988f527a 100644
--- a/database/schema.sql
+++ b/database/schema.sql
@@ -442,7 +442,7 @@ DELIMITER ;
-- PSUs on tiles
DROP TABLE IF EXISTS psus;
CREATE TABLE psus (
- id INTEGER NOT NULL AUTO_INCREMENT,
+ id INTEGER NOT NULL,
energy_kwh INTEGER NOT NULL CHECK (energy_kwh > 0),
type VARCHAR(50) NOT NULL,
failure_model_id INTEGER NOT NULL,
@@ -464,7 +464,7 @@ CREATE TABLE psus (
-- Cooling items on tiles
DROP TABLE IF EXISTS cooling_items;
CREATE TABLE cooling_items (
- id INTEGER NOT NULL AUTO_INCREMENT,
+ id INTEGER NOT NULL,
energy_consumption_w INTEGER NOT NULL CHECK (energy_consumption_w > 0),
type VARCHAR(50) NOT NULL,
failure_model_id INTEGER NOT NULL,
@@ -486,7 +486,7 @@ CREATE TABLE cooling_items (
-- Racks on tiles
DROP TABLE IF EXISTS racks;
CREATE TABLE racks (
- id INTEGER NOT NULL AUTO_INCREMENT,
+ id INTEGER NOT NULL,
name TEXT,
capacity INTEGER NOT NULL CHECK (capacity > 0),
power_capacity_w INTEGER NOT NULL CHECK (power_capacity_w > 0),