diff --git a/wwwroot/inc/install.php b/wwwroot/inc/install.php
index e35d8fb..45a2853 100644
--- a/wwwroot/inc/install.php
+++ b/wwwroot/inc/install.php
@@ -447,15 +447,15 @@ CREATE TABLE `AttributeMap` (
 ) ENGINE=InnoDB;
 
 CREATE TABLE `AttributeValue` (
-  `object_id` int(10) unsigned default NULL,
+  `object_id` int(10) unsigned NOT NULL,
   -- Default value intentionally breaks the constraint, this blocks
   -- any insertion, which doesn't have 'object_tid' on the column list.
   `object_tid` int(10) unsigned NOT NULL default '0',
-  `attr_id` int(10) unsigned default NULL,
+  `attr_id` int(10) unsigned NOT NULL,
   `string_value` char(255) default NULL,
   `uint_value` int(10) unsigned default NULL,
   `float_value` float default NULL,
-  UNIQUE KEY `object_id` (`object_id`,`attr_id`),
+  PRIMARY KEY (`object_id`,`attr_id`),
   KEY `attr_id-uint_value` (`attr_id`,`uint_value`),
   KEY `attr_id-string_value` (`attr_id`,`string_value`(12)),
   KEY `id-tid` (`object_id`,`object_tid`),
diff --git a/wwwroot/inc/upgrade.php b/wwwroot/inc/upgrade.php
index 5d0600a..8b43f4c 100644
--- a/wwwroot/inc/upgrade.php
+++ b/wwwroot/inc/upgrade.php
@@ -1254,6 +1254,9 @@ CREATE TABLE `CactiGraph` (
 
 			$query[] = "UPDATE Config SET varvalue = '0.19.13' WHERE varname = 'DB_VERSION'";
 			break;
+		case '0.19.14':
+			$query[] = 'ALTER TABLE `racktables`.`AttributeValue` CHANGE COLUMN `object_id` `object_id` INT(10) UNSIGNED NOT NULL  , CHANGE COLUMN `attr_id` `attr_id` INT(10) UNSIGNED NOT NULL;';
+			$query[] = 'ALTER TABLE `racktables`.`AttributeValue` ADD PRIMARY KEY (`object_id`, `attr_id`) , DROP INDEX `object_id` ;';
 		case 'dictionary':
 			$query = reloadDictionary();
 			break;
