Nest migration code
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
37543c0530
commit
e09c99cefa
|
@ -20,14 +20,14 @@ class Version22000Date20210525173326 extends SimpleMigrationStep {
|
||||||
/** @var ISchemaWrapper $schema */
|
/** @var ISchemaWrapper $schema */
|
||||||
$schema = $schemaClosure();
|
$schema = $schemaClosure();
|
||||||
|
|
||||||
$table = $schema->createTable('previously_used_userids');
|
if (!$schema->hasTable('previously_used_userids')) {
|
||||||
|
$table = $schema->createTable('previously_used_userids');
|
||||||
$table->addColumn('user_id_hash', \OCP\DB\Types::STRING, [
|
$table->addColumn('user_id_hash', \OCP\DB\Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 128,
|
'length' => 128,
|
||||||
]);
|
]);
|
||||||
|
$table->setPrimaryKey(['user_id_hash'], 'uid_hash_idx');
|
||||||
$table->setPrimaryKey(['user_id_hash'], 'uid_hash_idx');
|
}
|
||||||
|
|
||||||
return $schema;
|
return $schema;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue