Browse Source

[master] Merge branch 'trac5195' (DB schema update for flex-id)

Tomek Mrugalski 8 years ago
parent
commit
37c26cc30b

+ 2 - 1
src/share/database/scripts/mysql/dhcpdb_create.mysql

@@ -480,8 +480,9 @@ UPDATE schema_version
 SET version = '5', minor = '0';
 # This line concludes database upgrade to version 5.0.
 
-# Add missing 'client-id' host identifier type.
+# Add missing 'client-id' and new 'flex-id' host identifier types.
 INSERT INTO host_identifier_type VALUES (3, 'client-id');
+INSERT INTO host_identifier_type VALUES (4, 'flex-id');
 
 # Update the schema version number
 UPDATE schema_version

+ 2 - 1
src/share/database/scripts/mysql/upgrade_5.0_to_5.1.sh.in

@@ -17,8 +17,9 @@ fi
 
 mysql "$@" <<EOF
 
-# Add missing 'client-id' host identifier type.
+# Add missing 'client-id' and new 'flex-id' host identifier types.
 INSERT INTO host_identifier_type VALUES (3, 'client-id');
+INSERT INTO host_identifier_type VALUES (4, 'flex-id');
 
 # Update the schema version number
 UPDATE schema_version

+ 5 - 0
src/share/database/scripts/pgsql/dhcpdb_create.pgsql

@@ -483,11 +483,11 @@ UPDATE schema_version
 
 -- Schema 3.0 specification ends here.
 
+-- This is a placeholder for the changes between 3.0 and 3.1. We have added a
+-- missing 'client-id' host reservation type entry that had been accidentally
+-- omitted when the 2.0 -> 3.0 upgrade script was created.
+-- Also, new flexible identifier has been added.
+INSERT INTO host_identifier_type VALUES (4, 'flex-id');
 
 -- Set 3.1 schema version.
 UPDATE schema_version

+ 3 - 0
src/share/database/scripts/pgsql/upgrade_3.0_to_3.1.sh.in

@@ -32,6 +32,9 @@ INSERT INTO host_identifier_type (type, name)
         SELECT type FROM host_identifier_type WHERE type = 3
     );
 
+-- We also add a new identifier type: flex-id.
+INSERT INTO host_identifier_type VALUES (4, 'flex-id');
+
 -- Set 3.1 schema version.
 UPDATE schema_version
     SET version = '3', minor = '1';