diff --git a/apps/files_encryption/appinfo/database.xml b/apps/files_encryption/appinfo/database.xml
index ca149f0c69d5da8570a15f1d7f8cbd78d8138ca8..4587930da0a3c25fb3eecbb4c39afebf9de866ec 100644
--- a/apps/files_encryption/appinfo/database.xml
+++ b/apps/files_encryption/appinfo/database.xml
@@ -22,14 +22,14 @@
 			</field>
 			<field>
 				<name>recovery_enabled</name>
-				<type>boolean</type>
+				<type>integer</type>
 				<notnull>true</notnull>
 				<default>0</default>
 				<comments>Whether encryption key recovery is enabled</comments>
 			</field>
 			<field>
 				<name>migration_status</name>
-				<type>boolean</type>
+				<type>integer</type>
 				<notnull>true</notnull>
 				<default>0</default>
 				<comments>Whether encryption migration has been performed</comments>
diff --git a/apps/files_encryption/tests/share.php b/apps/files_encryption/tests/share.php
index de02513dea3eb543aabb6082437d582bc3fb1c5f..efff8e322e470200e5bef5d95b15dc6e82e53b4c 100755
--- a/apps/files_encryption/tests/share.php
+++ b/apps/files_encryption/tests/share.php
@@ -452,7 +452,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase
         \OC_FileProxy::$enabled = $proxyStatus;
 
         // share the file
-        \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK, null, false);
+        \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK, false, OCP\PERMISSION_ALL);
 
         // login as admin
         $this->loginHelper('admin');
@@ -572,7 +572,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase
 		$this->assertTrue($util->checkRecoveryPassword('test123'));
 
 		// enable recovery for admin
-		$this->assertTrue($util->setRecoveryForUser(true));
+		$this->assertTrue($util->setRecoveryForUser(1));
 
 		// create folder structure
 		$this->view->mkdir('/admin/files' . $this->folder1);
@@ -594,7 +594,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase
 		$this->assertTrue($this->view->file_exists('/admin/files_encryption/share-keys/' . $this->folder1 . $this->subfolder . $this->subsubfolder .'/'. $this->filename . '.'.$recoveryKeyId.'.shareKey'));
 
 		// disable recovery for admin
-		$this->assertTrue($util->setRecoveryForUser(false));
+		$this->assertTrue($util->setRecoveryForUser(0));
 
 		// remove all recovery keys
 		$util->removeRecoveryKeys('/');
@@ -604,7 +604,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase
 		$this->assertFalse($this->view->file_exists('/admin/files_encryption/share-keys/' . $this->folder1 . $this->subfolder . $this->subsubfolder .'/'. $this->filename . '.'.$recoveryKeyId.'.shareKey'));
 
 		// enable recovery for admin
-		$this->assertTrue($util->setRecoveryForUser(true));
+		$this->assertTrue($util->setRecoveryForUser(1));
 
 		// remove all recovery keys
 		$util->addRecoveryKeys('/');
@@ -639,7 +639,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase
 		$util = new \OCA\Encryption\Util(new \OC_FilesystemView('/'), 'user1');
 
 		// enable recovery for admin
-		$this->assertTrue($util->setRecoveryForUser(true));
+		$this->assertTrue($util->setRecoveryForUser(1));
 
 		// create folder structure
 		$this->view->mkdir('/user1/files' . $this->folder1);
@@ -688,7 +688,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase
 		$this->assertFalse($this->view->file_exists('/user1/files_encryption/share-keys/' . $this->folder1 . $this->subfolder . $this->subsubfolder .'/'. $this->filename . '.'.$recoveryKeyId.'.shareKey'));
 
 		// enable recovery for admin
-		$this->assertTrue($util->setRecoveryForUser(false));
+		$this->assertTrue($util->setRecoveryForUser(0));
 	}
 
 	/**