aboutsummaryrefslogtreecommitdiffstats
path: root/core/Migrations
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-11-09 06:59:42 +0100
committerJoas Schilling <coding@schilljs.com>2023-11-09 06:59:42 +0100
commit960b95bb8ec1c4e93eb4bad030b9fe5907431ad0 (patch)
tree7a38da5f691d97571b476f621c0e73fe92eec86c /core/Migrations
parenta79dbf3a31f8127b5e12d978e8df90e764a5c3ec (diff)
downloadnextcloud-server-960b95bb8ec1c4e93eb4bad030b9fe5907431ad0.tar.gz
nextcloud-server-960b95bb8ec1c4e93eb4bad030b9fe5907431ad0.zip
fix(migration): Fix files metadata migration
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Migrations')
-rw-r--r--core/Migrations/Version28000Date20231004103301.php35
1 files changed, 25 insertions, 10 deletions
diff --git a/core/Migrations/Version28000Date20231004103301.php b/core/Migrations/Version28000Date20231004103301.php
index 3266bf3a440..8888bf51910 100644
--- a/core/Migrations/Version28000Date20231004103301.php
+++ b/core/Migrations/Version28000Date20231004103301.php
@@ -42,12 +42,16 @@ class Version28000Date20231004103301 extends SimpleMigrationStep {
$table->addColumn('id', Types::BIGINT, [
'autoincrement' => true,
'notnull' => true,
- 'length' => 15,
- 'unsigned' => true,
+ 'length' => 20,
+ ]);
+ $table->addColumn('file_id', Types::BIGINT, [
+ 'notnull' => true,
+ 'length' => 20,
]);
- $table->addColumn('file_id', Types::BIGINT, ['notnull' => false, 'length' => 15,]);
$table->addColumn('json', Types::TEXT);
- $table->addColumn('sync_token', Types::STRING, ['length' => 15]);
+ $table->addColumn('sync_token', Types::STRING, [
+ 'length' => 15,
+ ]);
$table->addColumn('last_update', Types::DATETIME);
$table->setPrimaryKey(['id']);
@@ -60,13 +64,24 @@ class Version28000Date20231004103301 extends SimpleMigrationStep {
$table->addColumn('id', Types::BIGINT, [
'autoincrement' => true,
'notnull' => true,
- 'length' => 15,
- 'unsigned' => true,
+ 'length' => 20,
+ ]);
+ $table->addColumn('file_id', Types::BIGINT, [
+ 'notnull' => true,
+ 'length' => 20,
+ ]);
+ $table->addColumn('meta_key', Types::STRING, [
+ 'notnull' => false,
+ 'length' => 31,
+ ]);
+ $table->addColumn('meta_value_string', Types::STRING, [
+ 'notnull' => false,
+ 'length' => 63,
+ ]);
+ $table->addColumn('meta_value_int', Types::BIGINT, [
+ 'notnull' => false,
+ 'length' => 11,
]);
- $table->addColumn('file_id', Types::BIGINT, ['notnull' => false, 'length' => 15]);
- $table->addColumn('meta_key', Types::STRING, ['notnull' => false, 'length' => 31]);
- $table->addColumn('meta_value_string', Types::STRING, ['notnull' => false, 'length' => 63]);
- $table->addColumn('meta_value_int', Types::BIGINT, ['notnull' => false, 'length' => 11]);
$table->setPrimaryKey(['id']);
$table->addIndex(['file_id', 'meta_key', 'meta_value_string'], 'f_meta_index');