]> source.dussan.org Git - nextcloud-server.git/commitdiff
[Sharing 2.0] Add a new db column for the file owner
authorRoeland Jago Douma <rullzer@owncloud.com>
Tue, 24 Nov 2015 11:13:19 +0000 (12:13 +0100)
committerRoeland Jago Douma <rullzer@owncloud.com>
Wed, 25 Nov 2015 12:17:02 +0000 (13:17 +0100)
We need to store the owner of a file in the db to do efficient queries
on the owner of a file. Without this we need to construct fill paths for
each file id in the table and see who the owner of a file is. Which does
not scale.

db_structure.xml
version.php

index d4e566d1d5447a4c34fca90a2bf0687fa204c07d..1b38a527a129ebc93605690184323b520015b8a0 100644 (file)
                        </field>
 
                        <!-- Foreign Key users::uid -->
+            <!-- This is the initiator of the share -->
                        <field>
                                <name>uid_owner</name>
                                <type>text</type>
                                <length>64</length>
                        </field>
 
+                       <!-- Foreign Key users::uid -->
+            <!-- This is the owner of the file, this can be
+                 different from the initiator of the share.
+                 The naming is subobtimal but prevents huge
+                 migration steps -->
+                       <field>
+                               <name>uid_fileowner</name>
+                               <type>text</type>
+                               <default></default>
+                               <notnull>false</notnull>
+                               <length>64</length>
+                       </field>
+
                        <!-- Foreign Key share::id or NULL -->
                        <field>
                                <name>parent</name>
index 7f45f5899e1266b7c7b1a7771e69bf9358ba4afe..50adcf5db604e4b80b01e3ef5c85c4a1529fbd59 100644 (file)
@@ -25,7 +25,7 @@
 // We only can count up. The 4. digit is only for the internal patchlevel to trigger DB upgrades
 // between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
 // when updating major/minor version number.
-$OC_Version = array(9, 0, 0, 2);
+$OC_Version = array(9, 0, 0, 3);
 
 // The human readable string
 $OC_VersionString = '9.0 pre alpha';