From 5d17b7c01ea31fd845019cb411336b9b722184e8 Mon Sep 17 00:00:00 2001
From: leonoverweel <l.overweel@gmail.com>
Date: Sun, 26 Feb 2017 23:52:54 +0100
Subject: Insert database rows individually in SQLite schema

The Windows version of Python SQLite said multiple insertions at once was
a syntax error.
---
 database/schema.sql | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

(limited to 'database/schema.sql')

diff --git a/database/schema.sql b/database/schema.sql
index 5604d419..7c17e48f 100644
--- a/database/schema.sql
+++ b/database/schema.sql
@@ -36,7 +36,9 @@ CREATE UNIQUE INDEX authorizations_index ON authorizations (
 CREATE TABLE IF NOT EXISTS authorization_levels (
     level                   TEXT PRIMARY KEY        NOT NULL
 );
-INSERT INTO authorization_levels (level) VALUES ("OWN"), ("EDIT"), ("VIEW");
+INSERT INTO authorization_levels (level) VALUES ("OWN");
+INSERT INTO authorization_levels (level) VALUES ("EDIT");
+INSERT INTO authorization_levels (level) VALUES ("VIEW");
 
 /*
 *   A Simulation has several Paths, which define the topology of the datacenter at different times. A Simulation also
@@ -205,7 +207,11 @@ CREATE TABLE IF NOT EXISTS rooms (
 CREATE TABLE IF NOT EXISTS room_types (
     name                    TEXT PRIMARY KEY        NOT NULL
 );
-INSERT INTO room_types (name) VALUES ('SERVER'), ('HALLWAY'), ('OFFICE'), ('POWER'), ('COOLING');
+INSERT INTO room_types (name) VALUES ('SERVER');
+INSERT INTO room_types (name) VALUES ('HALLWAY');
+INSERT INTO room_types (name) VALUES ('OFFICE');
+INSERT INTO room_types (name) VALUES ('POWER');
+INSERT INTO room_types (name) VALUES ('COOLING');
 
 /*
 *   A room consists of tiles that have a quantized (x,y) position. The same tile can't be in multiple rooms. All tiles 
@@ -293,7 +299,9 @@ CREATE TABLE IF NOT EXISTS objects (
 CREATE TABLE IF NOT EXISTS object_types (
     name                    TEXT PRIMARY KEY        NOT NULL
 );
-INSERT INTO object_types (name) VALUES ('PSU'), ('COOLING_ITEM'), ('RACK');
+INSERT INTO object_types (name) VALUES ('PSU');
+INSERT INTO object_types (name) VALUES ('COOLING_ITEM');
+INSERT INTO object_types (name) VALUES ('RACK');
 
 -- Allowed objects table
 CREATE TABLE IF NOT EXISTS allowed_objects (
-- 
cgit v1.2.3

