summaryrefslogtreecommitdiffstats
path: root/lib/public/Migration
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-01-17 11:35:20 +0100
committerJoas Schilling <coding@schilljs.com>2018-01-17 13:53:09 +0100
commited999066e5e05fc569c1a9940e64aa13a916ddc8 (patch)
tree69af8b0fe2446718e52e70da6e777762cc028d51 /lib/public/Migration
parent4f30c2fbe43e0d6f24ba3bff881526b2b6c2747d (diff)
downloadnextcloud-server-ed999066e5e05fc569c1a9940e64aa13a916ddc8.tar.gz
nextcloud-server-ed999066e5e05fc569c1a9940e64aa13a916ddc8.zip
Fix the type hints of migrations and correctly inject the wrapped schema into migrations
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public/Migration')
-rw-r--r--lib/public/Migration/BigIntMigration.php8
-rw-r--r--lib/public/Migration/IMigrationStep.php10
-rw-r--r--lib/public/Migration/SimpleMigrationStep.php10
3 files changed, 14 insertions, 14 deletions
diff --git a/lib/public/Migration/BigIntMigration.php b/lib/public/Migration/BigIntMigration.php
index 9e6003714e5..41c48f2181a 100644
--- a/lib/public/Migration/BigIntMigration.php
+++ b/lib/public/Migration/BigIntMigration.php
@@ -23,8 +23,8 @@
namespace OCP\Migration;
-use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Type;
+use OCP\DB\ISchemaWrapper;
/**
* @since 13.0.0
@@ -40,13 +40,13 @@ abstract class BigIntMigration extends SimpleMigrationStep {
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
- * @return null|Schema
+ * @return null|ISchemaWrapper
* @since 13.0.0
*/
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
- /** @var Schema $schema */
+ /** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$tables = $this->getColumnsByTable();
diff --git a/lib/public/Migration/IMigrationStep.php b/lib/public/Migration/IMigrationStep.php
index 11b92ecf0cf..e12d962683e 100644
--- a/lib/public/Migration/IMigrationStep.php
+++ b/lib/public/Migration/IMigrationStep.php
@@ -23,7 +23,7 @@
namespace OCP\Migration;
-use Doctrine\DBAL\Schema\Schema;
+use OCP\DB\ISchemaWrapper;
/**
* @since 13.0.0
@@ -32,7 +32,7 @@ interface IMigrationStep {
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @since 13.0.0
*/
@@ -40,16 +40,16 @@ interface IMigrationStep {
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
- * @return null|Schema
+ * @return null|ISchemaWrapper
* @since 13.0.0
*/
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options);
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @since 13.0.0
*/
diff --git a/lib/public/Migration/SimpleMigrationStep.php b/lib/public/Migration/SimpleMigrationStep.php
index 58c68064484..da46c687644 100644
--- a/lib/public/Migration/SimpleMigrationStep.php
+++ b/lib/public/Migration/SimpleMigrationStep.php
@@ -23,7 +23,7 @@
namespace OCP\Migration;
-use Doctrine\DBAL\Schema\Schema;
+use OCP\DB\ISchemaWrapper;
/**
* @since 13.0.0
@@ -32,7 +32,7 @@ abstract class SimpleMigrationStep implements IMigrationStep {
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @since 13.0.0
*/
@@ -41,9 +41,9 @@ abstract class SimpleMigrationStep implements IMigrationStep {
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
- * @return null|Schema
+ * @return null|ISchemaWrapper
* @since 13.0.0
*/
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
@@ -52,7 +52,7 @@ abstract class SimpleMigrationStep implements IMigrationStep {
/**
* @param IOutput $output
- * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @since 13.0.0
*/