Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(migration-attributes): set as Consumable
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl authored and backportbot[bot] committed Sep 4, 2025
commit 80656e5ebc940b7261256a0178fe08356288e02a
4 changes: 2 additions & 2 deletions lib/public/Migration/Attributes/AddColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
namespace OCP\Migration\Attributes;

use Attribute;
use OCP\AppFramework\Attribute\Consumable;

/**
* attribute on new column creation
*
* @since 30.0.0
*/
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)]
#[Consumable(since: '30.0.0')]
class AddColumn extends ColumnMigrationAttribute {
/**
* @return string
Expand Down
4 changes: 2 additions & 2 deletions lib/public/Migration/Attributes/AddIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
namespace OCP\Migration\Attributes;

use Attribute;
use OCP\AppFramework\Attribute\Consumable;

/**
* attribute on index creation
*
* @since 30.0.0
*/
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)]
#[Consumable(since: '30.0.0')]
class AddIndex extends IndexMigrationAttribute {
/**
* @return string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
*/
namespace OCP\Migration\Attributes;

use OCP\AppFramework\Attribute\Consumable;

/**
* generic class related to migration attribute about column changes
*
* @since 30.0.0
*/
#[Consumable(since: '30.0.0')]
class ColumnMigrationAttribute extends MigrationAttribute {
/**
* @param string $table name of the database table
Expand Down
4 changes: 3 additions & 1 deletion lib/public/Migration/Attributes/ColumnType.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
*/
namespace OCP\Migration\Attributes;

use OCP\AppFramework\Attribute\Consumable;

/**
* enum ColumnType based on OCP\DB\Types
*
* @see \OCP\DB\Types
* @since 30.0.0
*/
#[Consumable(since: '30.0.0')]
enum ColumnType : string {
/** @since 30.0.0 */
case BIGINT = 'bigint';
Expand Down
4 changes: 2 additions & 2 deletions lib/public/Migration/Attributes/CreateTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
namespace OCP\Migration\Attributes;

use Attribute;
use OCP\AppFramework\Attribute\Consumable;

/**
* attribute on table creation
*
* @since 30.0.0
*/
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)]
#[Consumable(since: '30.0.0')]
class CreateTable extends TableMigrationAttribute {
/**
* @return string
Expand Down
4 changes: 2 additions & 2 deletions lib/public/Migration/Attributes/DataCleansing.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
namespace OCP\Migration\Attributes;

use Attribute;
use OCP\AppFramework\Attribute\Consumable;

/**
* attribute on new column creation
*
* @since 32.0.0
*/
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)]
#[Consumable(since: '32.0.0')]
class DataCleansing extends DataMigrationAttribute {
/**
* @return string
Expand Down
5 changes: 3 additions & 2 deletions lib/public/Migration/Attributes/DataMigrationAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
*/
namespace OCP\Migration\Attributes;

use OCP\AppFramework\Attribute\Consumable;

/**
* generic class related to migration attribute about data migration
*
* @since 32.0.0
*/
#[Consumable(since: '32.0.0')]
class DataMigrationAttribute extends MigrationAttribute {
}
4 changes: 2 additions & 2 deletions lib/public/Migration/Attributes/DropColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
namespace OCP\Migration\Attributes;

use Attribute;
use OCP\AppFramework\Attribute\Consumable;

/**
* attribute on column drop
*
* @since 30.0.0
*/
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)]
#[Consumable(since: '30.0.0')]
class DropColumn extends ColumnMigrationAttribute {
/**
* @return string
Expand Down
4 changes: 2 additions & 2 deletions lib/public/Migration/Attributes/DropIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
namespace OCP\Migration\Attributes;

use Attribute;
use OCP\AppFramework\Attribute\Consumable;

/**
* attribute on index drop
*
* @since 30.0.0
*/
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)]
#[Consumable(since: '30.0.0')]
class DropIndex extends IndexMigrationAttribute {
/**
* @return string
Expand Down
4 changes: 2 additions & 2 deletions lib/public/Migration/Attributes/DropTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
namespace OCP\Migration\Attributes;

use Attribute;
use OCP\AppFramework\Attribute\Consumable;

/**
* attribute on table drop
*
* @since 30.0.0
*/
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)]
#[Consumable(since: '30.0.0')]
class DropTable extends TableMigrationAttribute {
/**
* @return string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
*/
namespace OCP\Migration\Attributes;

use OCP\AppFramework\Attribute\Consumable;

/**
* generic entry, used to replace migration attribute not yet known in current version
* but used in a future release
*
* @since 30.0.0
*/
#[Consumable(since: '30.0.0')]
class GenericMigrationAttribute extends MigrationAttribute {
/**
* @param array $details
Expand Down
5 changes: 3 additions & 2 deletions lib/public/Migration/Attributes/IndexMigrationAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
*/
namespace OCP\Migration\Attributes;

use OCP\AppFramework\Attribute\Consumable;

/**
* generic class related to migration attribute about index changes
*
* @since 30.0.0
*/
#[Consumable(since: '30.0.0')]
class IndexMigrationAttribute extends MigrationAttribute {
/**
* @param string $table name of the database table
Expand Down
5 changes: 3 additions & 2 deletions lib/public/Migration/Attributes/IndexType.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
*/
namespace OCP\Migration\Attributes;

use OCP\AppFramework\Attribute\Consumable;

/**
* type of index
*
* @since 30.0.0
*/
#[Consumable(since: '30.0.0')]
enum IndexType : string {
/** @since 30.0.0 */
case PRIMARY = 'primary';
Expand Down
5 changes: 2 additions & 3 deletions lib/public/Migration/Attributes/MigrationAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
namespace OCP\Migration\Attributes;

use JsonSerializable;
use OCP\AppFramework\Attribute\Consumable;

/**
* @since 30.0.0
*/
#[Consumable(since: '30.0.0')]
class MigrationAttribute implements JsonSerializable {
/**
* @param string $table name of the database table
Expand Down
4 changes: 2 additions & 2 deletions lib/public/Migration/Attributes/ModifyColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
namespace OCP\Migration\Attributes;

use Attribute;
use OCP\AppFramework\Attribute\Consumable;

/**
* attribute on column modification
*
* @since 30.0.0
*/
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)]
#[Consumable(since: '30.0.0')]
class ModifyColumn extends ColumnMigrationAttribute {
/**
* @return string
Expand Down
5 changes: 3 additions & 2 deletions lib/public/Migration/Attributes/TableMigrationAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
*/
namespace OCP\Migration\Attributes;

use OCP\AppFramework\Attribute\Consumable;

/**
* generic class related to migration attribute about table changes
*
* @since 30.0.0
*/
#[Consumable(since: '30.0.0')]
class TableMigrationAttribute extends MigrationAttribute {
/**
* @param string $table name of the database table
Expand Down