]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/File_redirection.php
unique keys and indexes must be NOT NULL or MySQL fucks up
[quix0rs-gnu-social.git] / classes / File_redirection.php
index 9309642553b0de545a4da26291376018500c5bbc..ade04fbcbcac278057cec38ea4b20e0280fef381 100644 (file)
@@ -43,7 +43,7 @@ class File_redirection extends Managed_DataObject
     {
         return array(
             'fields' => array(
-                'urlhash' => array('type' => 'varchar', 'length' => 64, 'description' => 'sha256 hash of the URL'),
+                'urlhash' => array('type' => 'varchar', 'length' => 64, 'not null' => true, 'description' => 'sha256 hash of the URL'),
                 'url' => array('type' => 'text', 'description' => 'short URL (or any other kind of redirect) for file (id)'),
                 'file_id' => array('type' => 'int', 'description' => 'short URL for what URL/file'),
                 'redirections' => array('type' => 'int', 'description' => 'redirect count'),