]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/File.php
Had to avoid using indexes in the migration phase
[quix0rs-gnu-social.git] / classes / File.php
index c7239777ea8dddbf68bceefec121b3aae024f509..34cd4cdbc7269db01f4f0a0d715060a41310a030 100644 (file)
@@ -46,7 +46,7 @@ class File extends Managed_DataObject
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true),
                 'urlhash' => array('type' => 'varchar', 'length' => 64, 'not null' => true, 'description' => 'sha256 of destination URL (url field)'),
-                'url' => array('type' => 'text', 'description' => 'destination URL after following redirections'),
+                'url' => array('type' => 'text', 'description' => 'destination URL after following possible redirections'),
                 'mimetype' => array('type' => 'varchar', 'length' => 50, 'description' => 'mime type of resource'),
                 'size' => array('type' => 'int', 'description' => 'size of resource when available'),
                 'title' => array('type' => 'varchar', 'length' => 191, 'description' => 'title of resource when available'),
@@ -629,8 +629,14 @@ class File extends Managed_DataObject
         $schemadef['fields']['urlhash'] = array (
                                               'type' => 'varchar',
                                               'length' => 64,
-                                              'description' => 'sha256 of destination URL after following redirections',
+                                              'not null' => true,
+                                              'description' => 'sha256 of destination URL (url field)',
                                             );
+        $schemadef['fields']['url'] = array (
+                                              'type' => 'text',
+                                              'description' => 'destination URL after following possible redirections',
+                                            );
+        unset($schemadef['unique keys']);
         $schema->ensureTable($table, $schemadef);
         echo "DONE.\n";