 					}
 					if opt.count == 0 {
 						verbage += " NOT NULL"
+						keyName = key
 					}
 					opt.append(verbage)
 				}
 			}
-			createStatement = "CREATE TABLE IF NOT EXISTS \(table()) (\(opt.joined(separator: ", ")))"
+			let keyComponent = ", CONSTRAINT \"\(table())_key\" PRIMARY KEY (\"\(keyName)\") NOT DEFERRABLE INITIALLY IMMEDIATE"
+
+			createStatement = "CREATE TABLE IF NOT EXISTS \(table()) (\(opt.joined(separator: ", "))\(keyComponent));"
+
 		}
 		do {
 			try sql(createStatement, params: [])

			throw StORMError.error(String(describing: error))
		}
	}

}



				var verbage = ""
				if !key.hasPrefix("internal_") {
					verbage = "\(key) "
					if child.value is Int && opt.count == 0 {
						verbage += "serial"
					} else if child.value is Int {
						verbage += "int8"
					} else if child.value is Bool {
						verbage += "bool"
