Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(migrations): add metadata to existing migrations #46974

Merged
merged 2 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions apps/dav/lib/Migration/Version1031Date20240610134258.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\Attributes\AddColumn;
use OCP\Migration\Attributes\ColumnType;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

#[AddColumn(table: 'dav_absence', name: 'replacement_user_id', type: ColumnType::STRING)]
#[AddColumn(table: 'dav_absence', name: 'replacement_user_display_name', type: ColumnType::STRING)]
class Version1031Date20240610134258 extends SimpleMigrationStep {
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\Attributes\AddColumn;
use OCP\Migration\Attributes\ColumnType;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

#[AddColumn(table: 'files_trash', name: 'deleted_by', type: ColumnType::STRING)]
class Version1020Date20240403003535 extends SimpleMigrationStep {

/**
Expand Down
8 changes: 8 additions & 0 deletions core/Migrations/Version30000Date20240429122720.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,20 @@
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\Attributes\AddIndex;
use OCP\Migration\Attributes\CreateTable;
use OCP\Migration\Attributes\IndexType;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

/**
*
*/
#[CreateTable(table: 'taskprocessing_tasks')]
#[AddIndex(table: 'taskprocessing_tasks', type: IndexType::PRIMARY)]
#[AddIndex(table: 'taskprocessing_tasks', type: IndexType::INDEX)]
#[AddIndex(table: 'taskprocessing_tasks', type: IndexType::INDEX)]
#[AddIndex(table: 'taskprocessing_tasks', type: IndexType::INDEX)]
class Version30000Date20240429122720 extends SimpleMigrationStep {

/**
Expand Down
5 changes: 5 additions & 0 deletions core/Migrations/Version30000Date20240708160048.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\Attributes\AddColumn;
use OCP\Migration\Attributes\ColumnType;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

/**
*
*/
#[AddColumn(table: 'taskprocessing_tasks', name: 'scheduled_at', type: ColumnType::INTEGER)]
#[AddColumn(table: 'taskprocessing_tasks', name: 'started_at', type: ColumnType::INTEGER)]
#[AddColumn(table: 'taskprocessing_tasks', name: 'ended_at', type: ColumnType::INTEGER)]
class Version30000Date20240708160048 extends SimpleMigrationStep {

/**
Expand Down
4 changes: 4 additions & 0 deletions core/Migrations/Version30000Date20240717111406.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\Attributes\AddColumn;
use OCP\Migration\Attributes\ColumnType;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

/**
*
*/
#[AddColumn(table: 'taskprocessing_tasks', name: 'webhook_uri', type: ColumnType::STRING)]
#[AddColumn(table: 'taskprocessing_tasks', name: 'webhook_method', type: ColumnType::STRING)]
class Version30000Date20240717111406 extends SimpleMigrationStep {

/**
Expand Down
Loading