-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Maxence Lange <[email protected]> d Signed-off-by: Maxence Lange <[email protected]>
- Loading branch information
1 parent
5cf6e54
commit caffae9
Showing
15 changed files
with
449 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
apps/testing/lib/Migration/Version30000Date20240102030405.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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')] | ||
#[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'])] | ||
#[AddColumn('my_table')] | ||
#[AddColumn('my_table', 'another_field')] | ||
#[AddColumn('other_table', 'last_one', ColumnType::DATE)] | ||
#[AddIndex('my_table')] | ||
#[AddIndex('my_table', IndexType::PRIMARY)] | ||
#[DropColumn('other_table')] | ||
#[DropColumn('other_table', 'old_column', description: 'field is not used anymore and replaced by \'last_one\'')] | ||
#[DropIndex('other_table')] | ||
#[ModifyColumn('other_table')] | ||
#[ModifyColumn('other_table', 'this_field')] | ||
#[ModifyColumn('other_table', 'this_field', ColumnType::BIGINT)] | ||
class Version30000Date20240102030405 extends SimpleMigrationStep { | ||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.