]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3966] Updated schema files per review comments.
authorMarcin Siodelski <marcin@isc.org>
Tue, 15 Sep 2015 12:02:18 +0000 (14:02 +0200)
committerMarcin Siodelski <marcin@isc.org>
Tue, 15 Sep 2015 12:02:18 +0000 (14:02 +0200)
src/bin/admin/scripts/mysql/dhcpdb_create.mysql
src/lib/dhcpsrv/tests/schema_mysql_copy.h

index f3a3a2773b6ba93b682d37b5d154170609f429b5..9cd8fc344df837d4a9dac0f72e0f584096f28ce1 100644 (file)
@@ -272,13 +272,13 @@ CREATE INDEX lease6_by_state_expire ON lease6 (state, expire);
 # This is not used in queries from the DHCP server but rather in
 # direct queries from the lease database management tools.
 CREATE TABLE IF NOT EXISTS lease_state (
-  `state` INT UNSIGNED PRIMARY KEY NOT NULL,
-  `name` VARCHAR(64) NOT NULL);
+  state INT UNSIGNED PRIMARY KEY NOT NULL,
+  name VARCHAR(64) NOT NULL);
 
-  # Insert currently defined state names.
-  INSERT INTO lease_state VALUES (0, "default");
-  INSERT INTO lease_state VALUES (1, "declined");
-  INSERT INTO lease_state VALUES (2, "expired-reclaimed");
+# Insert currently defined state names.
+INSERT INTO lease_state VALUES (0, "default");
+INSERT INTO lease_state VALUES (1, "declined");
+INSERT INTO lease_state VALUES (2, "expired-reclaimed");
 
 UPDATE schema_version
 SET version = '4', minor = '0';
index a36aedca6059336e7e71134eb5f72997c03274df..cb93bbe09af7bb306ff7f9b6898659188ee518e9 100644 (file)
@@ -135,6 +135,19 @@ const char* create_statement[] = {
     "CREATE INDEX lease4_by_state_expire ON lease4 (state, expire)",
     "CREATE INDEX lease6_by_state_expire ON lease6 (state, expire)",
 
+    // Production schema includes the lease_state table which maps
+    // the lease states to their names. This is not used in the unit tests
+    // so it is commented out.
+
+    /*"CREATE TABLE IF NOT EXISTS lease_state (",
+        "state INT UNSIGNED PRIMARY KEY NOT NULL,"
+        "name VARCHAR(64) NOT NULL);",
+
+    "INSERT INTO lease_state VALUES (0, \"default\");",
+    "INSERT INTO lease_state VALUES (1, \"declined\");",
+    "INSERT INTO lease_state VALUES (2, \"expired-reclaimed\");",*/
+
+
     // Schema upgrade to 4.0 ends here.
 
     NULL