mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
feat(migrations): add metadata to existing migrations
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
parent
8f70441f84
commit
5e1196095c
5 changed files with 25 additions and 1 deletions
|
|
@ -12,9 +12,13 @@ namespace OCA\DAV\Migration;
|
|||
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: 'dav_absence', 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 */
|
||||
|
|
@ -23,7 +27,7 @@ class Version1031Date20240610134258 extends SimpleMigrationStep {
|
|||
$tableDavAbsence = $schema->getTable('dav_absence');
|
||||
|
||||
if (!$tableDavAbsence->hasColumn('replacement_user_id')) {
|
||||
$tableDavAbsence->addColumn('replacement_user_id', Types::STRING, [
|
||||
$tableDavAbsence->addColumn('dav_absence', Types::STRING, [
|
||||
'notnull' => false,
|
||||
'default' => '',
|
||||
'length' => 64,
|
||||
|
|
|
|||
|
|
@ -12,9 +12,12 @@ namespace OCA\Files_Trashbin\Migration;
|
|||
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 {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,12 +11,20 @@ namespace OC\Core\Migrations;
|
|||
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 {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,12 +11,17 @@ namespace OC\Core\Migrations;
|
|||
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 {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,12 +11,16 @@ namespace OC\Core\Migrations;
|
|||
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 {
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue