aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2024-08-02 01:22:44 -0100
committerMaxence Lange <maxence@artificial-owl.com>2024-08-02 18:26:12 -0100
commit5e1196095c039f4265c12454f855bd4987046f39 (patch)
treeabe1ea362a3b2d813fe542d26d6c4f0fc8ad5c70
parent8f70441f84860956035087894a59ba0d34e14d6b (diff)
downloadnextcloud-server-5e1196095c039f4265c12454f855bd4987046f39.tar.gz
nextcloud-server-5e1196095c039f4265c12454f855bd4987046f39.zip
feat(migrations): add metadata to existing migrations
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r--apps/dav/lib/Migration/Version1031Date20240610134258.php6
-rw-r--r--apps/files_trashbin/lib/Migration/Version1020Date20240403003535.php3
-rw-r--r--core/Migrations/Version30000Date20240429122720.php8
-rw-r--r--core/Migrations/Version30000Date20240708160048.php5
-rw-r--r--core/Migrations/Version30000Date20240717111406.php4
5 files changed, 25 insertions, 1 deletions
diff --git a/apps/dav/lib/Migration/Version1031Date20240610134258.php b/apps/dav/lib/Migration/Version1031Date20240610134258.php
index 4e5e2218c41..cf288dfac69 100644
--- a/apps/dav/lib/Migration/Version1031Date20240610134258.php
+++ b/apps/dav/lib/Migration/Version1031Date20240610134258.php
@@ -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,
diff --git a/apps/files_trashbin/lib/Migration/Version1020Date20240403003535.php b/apps/files_trashbin/lib/Migration/Version1020Date20240403003535.php
index a977f5be43a..3e85edf40b6 100644
--- a/apps/files_trashbin/lib/Migration/Version1020Date20240403003535.php
+++ b/apps/files_trashbin/lib/Migration/Version1020Date20240403003535.php
@@ -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 {
/**
diff --git a/core/Migrations/Version30000Date20240429122720.php b/core/Migrations/Version30000Date20240429122720.php
index 281ea1cfbd5..eeefc8dd10c 100644
--- a/core/Migrations/Version30000Date20240429122720.php
+++ b/core/Migrations/Version30000Date20240429122720.php
@@ -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 {
/**
diff --git a/core/Migrations/Version30000Date20240708160048.php b/core/Migrations/Version30000Date20240708160048.php
index 0b5596a05a9..253b9cc7a64 100644
--- a/core/Migrations/Version30000Date20240708160048.php
+++ b/core/Migrations/Version30000Date20240708160048.php
@@ -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 {
/**
diff --git a/core/Migrations/Version30000Date20240717111406.php b/core/Migrations/Version30000Date20240717111406.php
index 67293d8c1e7..558ac432387 100644
--- a/core/Migrations/Version30000Date20240717111406.php
+++ b/core/Migrations/Version30000Date20240717111406.php
@@ -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 {
/**