diff --git a/kv.py b/kv.py
index <HASH>..<HASH> 100644
--- a/kv.py
+++ b/kv.py
@@ -12,7 +12,7 @@ class KV(MutableMapping):
         self._db = sqlite3.connect(db_uri)
         self._db.isolation_level = None
         self._execute('CREATE TABLE IF NOT EXISTS data '
-                      '(key TEXT PRIMARY KEY, value TEXT)')
+                      '(key PRIMARY KEY, value)')
 
     def _execute(self, *args):
         return self._db.cursor().execute(*args)
diff --git a/tests.py b/tests.py
index <HASH>..<HASH> 100644
--- a/tests.py
+++ b/tests.py
@@ -74,6 +74,16 @@ class KVTest(unittest.TestCase):
         kv['c'] = 'x'
         self.assertItemsEqual(kv, ['a', 'b', 'c'])
 
+    def test_value_saved_with_int_key_is_retrieved_with_int_key(self):
+        kv = KV()
+        kv[13] = 'a'
+        self.assertEqual(kv[13], 'a')
+
+    def test_value_saved_with_int_key_is_not_retrieved_with_str_key(self):
+        kv = KV()
+        kv[13] = 'a'
+        self.assertIsNone(kv.get('13'))
+
 
 class KVPersistenceTest(unittest.TestCase):
integer keys don't mix with string keys