-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
namespace OCA\Testing\Migration; | ||
|
||
use Closure; | ||
use OCP\Migration\Attributes\AddColumn; | ||
use OCP\Migration\Attributes\AddIndex; | ||
use OCP\Migration\Attributes\ColumnType; | ||
use OCP\Migration\Attributes\CreateTable; | ||
use OCP\Migration\Attributes\DropColumn; | ||
use OCP\Migration\Attributes\DropIndex; | ||
use OCP\Migration\Attributes\DropTable; | ||
use OCP\Migration\Attributes\IndexType; | ||
use OCP\Migration\Attributes\ModifyColumn; | ||
use OCP\Migration\IOutput; | ||
use OCP\Migration\SimpleMigrationStep; | ||
|
||
#[DropTable('old_table')] | ||
Check failure Code scanning / Psalm InvalidDocblock Error test
Attribute arguments must be named.
Check failure on line 24 in apps/testing/lib/Migration/Version30000Date20240102030405.php GitHub Actions / static-code-analysisInvalidDocblock
|
||
#[CreateTable('new_table', description: 'Table is used to store things, but also to get more things', notes: ['this is a notice', 'and another one, if really needed'])] | ||
Check failure Code scanning / Psalm InvalidDocblock Error test
Attribute arguments must be named.
Check failure on line 25 in apps/testing/lib/Migration/Version30000Date20240102030405.php GitHub Actions / static-code-analysisInvalidDocblock
|
||
#[AddColumn('my_table')] | ||
Check failure Code scanning / Psalm InvalidDocblock Error test
Attribute arguments must be named.
Check failure on line 26 in apps/testing/lib/Migration/Version30000Date20240102030405.php GitHub Actions / static-code-analysisInvalidDocblock
|
||
#[AddColumn('my_table', 'another_field')] | ||
Check failure Code scanning / Psalm InvalidDocblock Error test
Attribute arguments must be named.
Check failure on line 27 in apps/testing/lib/Migration/Version30000Date20240102030405.php GitHub Actions / static-code-analysisInvalidDocblock
|
||
#[AddColumn('other_table', 'last_one', ColumnType::DATE)] | ||
Check failure Code scanning / Psalm InvalidDocblock Error test
Attribute arguments must be named.
Check failure on line 28 in apps/testing/lib/Migration/Version30000Date20240102030405.php GitHub Actions / static-code-analysisInvalidDocblock
|
||
#[AddIndex('my_table')] | ||
Check failure Code scanning / Psalm InvalidDocblock Error test
Attribute arguments must be named.
Check failure on line 29 in apps/testing/lib/Migration/Version30000Date20240102030405.php GitHub Actions / static-code-analysisInvalidDocblock
|
||
#[AddIndex('my_table', IndexType::PRIMARY)] | ||
Check failure Code scanning / Psalm InvalidDocblock Error test
Attribute arguments must be named.
Check failure on line 30 in apps/testing/lib/Migration/Version30000Date20240102030405.php GitHub Actions / static-code-analysisInvalidDocblock
|
||
#[DropColumn('other_table')] | ||
Check failure Code scanning / Psalm InvalidDocblock Error test
Attribute arguments must be named.
Check failure on line 31 in apps/testing/lib/Migration/Version30000Date20240102030405.php GitHub Actions / static-code-analysisInvalidDocblock
|
||
#[DropColumn('other_table', 'old_column', description: 'field is not used anymore and replaced by \'last_one\'')] | ||
Check failure Code scanning / Psalm InvalidDocblock Error test
Attribute arguments must be named.
Check failure on line 32 in apps/testing/lib/Migration/Version30000Date20240102030405.php GitHub Actions / static-code-analysisInvalidDocblock
|
||
#[DropIndex('other_table')] | ||
Check failure Code scanning / Psalm InvalidDocblock Error test
Attribute arguments must be named.
Check failure on line 33 in apps/testing/lib/Migration/Version30000Date20240102030405.php GitHub Actions / static-code-analysisInvalidDocblock
|
||
#[ModifyColumn('other_table')] | ||
Check failure Code scanning / Psalm InvalidDocblock Error test
Attribute arguments must be named.
|
||
#[ModifyColumn('other_table', 'this_field')] | ||
Check failure Code scanning / Psalm InvalidDocblock Error test
Attribute arguments must be named.
|
||
#[ModifyColumn('other_table', 'this_field', ColumnType::BIGINT)] | ||
Check failure Code scanning / Psalm InvalidDocblock Error test
Attribute arguments must be named.
|
||
class Version30000Date20240102030405 extends SimpleMigrationStep { | ||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { | ||
return null; | ||
} | ||
} |