Skip to content
Open
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: 3 additions & 1 deletion core/Migrations/Version30000Date20240815080800.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
$schema = $schemaClosure();

$table = $schema->getTable('webauthn');
$table->addColumn('user_verification', Types::BOOLEAN, ['notnull' => false, 'default' => false]);
if (!$table->hasColumn('user_verification')) {
$table->addColumn('user_verification', Types::BOOLEAN, ['notnull' => false, 'default' => false]);
}
return $schema;
}
}
24 changes: 18 additions & 6 deletions core/Migrations/Version31000Date20240814184402.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,31 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
$schema = $schemaClosure();

$table = $schema->getTable('preferences');
$table->addColumn('lazy', Types::SMALLINT, ['notnull' => true, 'default' => 0, 'length' => 1, 'unsigned' => true]);
$table->addColumn('type', Types::SMALLINT, ['notnull' => true, 'default' => 0, 'unsigned' => true]);
$table->addColumn('flags', Types::INTEGER, ['notnull' => true, 'default' => 0, 'unsigned' => true]);
$table->addColumn('indexed', Types::STRING, ['notnull' => false, 'default' => '', 'length' => 64]);
if (!$table->hasColumn('lazy')) {
$table->addColumn('lazy', Types::SMALLINT, ['notnull' => true, 'default' => 0, 'length' => 1, 'unsigned' => true]);
}
if (!$table->hasColumn('type')) {
$table->addColumn('type', Types::SMALLINT, ['notnull' => true, 'default' => 0, 'unsigned' => true]);
}
if (!$table->hasColumn('flags')) {
$table->addColumn('flags', Types::INTEGER, ['notnull' => true, 'default' => 0, 'unsigned' => true]);
}
if (!$table->hasColumn('indexed')) {
$table->addColumn('indexed', Types::STRING, ['notnull' => false, 'default' => '', 'length' => 64]);
}

// removing this index from Version13000Date20170718121200
// $table->addIndex(['appid', 'configkey'], 'preferences_app_key');
if ($table->hasIndex('preferences_app_key')) {
$table->dropIndex('preferences_app_key');
}

$table->addIndex(['userid', 'lazy'], 'prefs_uid_lazy_i');
$table->addIndex(['appid', 'configkey', 'indexed', 'flags'], 'prefs_app_key_ind_fl_i');
if (!$table->hasIndex('prefs_uid_lazy_i')) {
$table->addIndex(['userid', 'lazy'], 'prefs_uid_lazy_i');
}
if (!$table->hasIndex('prefs_app_key_ind_fl_i')) {
$table->addIndex(['appid', 'configkey', 'indexed', 'flags'], 'prefs_app_key_ind_fl_i');
}

return $schema;
}
Expand Down
4 changes: 3 additions & 1 deletion core/Migrations/Version33000Date20251023120529.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt

if ($schema->hasTable('preview_locations')) {
$table = $schema->getTable('preview_locations');
$table->addUniqueIndex(['bucket_name', 'object_store_name'], 'unique_bucket_store');
if (!$table->hasIndex('unique_bucket_store')) {
$table->addUniqueIndex(['bucket_name', 'object_store_name'], 'unique_bucket_store');
}
}

return $schema;
Expand Down
Loading