Commit 47152f05 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[3966] Updated schema files per review comments.

parent 979edee4
......@@ -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';
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment