reformat code
This commit is contained in:
parent
8e804a26b0
commit
a403b6b614
|
@ -55,30 +55,30 @@ class Version000000Date20210918151800 extends SimpleMigrationStep {
|
||||||
$table->addIndex(['matrix_room'], 'upschooling_mx_room_id_idx');
|
$table->addIndex(['matrix_room'], 'upschooling_mx_room_id_idx');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$schema->hasTable('upschooling_users')) {
|
if (!$schema->hasTable('upschooling_users')) {
|
||||||
$table = $schema->createTable('upschooling_users');
|
$table = $schema->createTable('upschooling_users');
|
||||||
$table->addColumn('id', 'integer', [
|
$table->addColumn('id', 'integer', [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('user_id', 'string', [
|
$table->addColumn('user_id', 'string', [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('matrix_user', 'string', [
|
$table->addColumn('matrix_user', 'string', [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 200,
|
'length' => 200,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('matrix_token', 'string', [
|
$table->addColumn('matrix_token', 'string', [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 200,
|
'length' => 200,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$table->setPrimaryKey(['id']);
|
$table->setPrimaryKey(['id']);
|
||||||
$table->addUniqueConstraint(['user_id'], 'upschooling_mx_user_nc_uniq');
|
$table->addUniqueConstraint(['user_id'], 'upschooling_mx_user_nc_uniq');
|
||||||
$table->addUniqueConstraint(['matrix_user'], 'upschooling_mx_user_mx_uniq');
|
$table->addUniqueConstraint(['matrix_user'], 'upschooling_mx_user_mx_uniq');
|
||||||
$table->addForeignKeyConstraint('users', ['user_id'], ['uid'], [], 'upschooling_mx_user_nc_fk');
|
$table->addForeignKeyConstraint('users', ['user_id'], ['uid'], [], 'upschooling_mx_user_nc_fk');
|
||||||
}
|
}
|
||||||
return $schema;
|
return $schema;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue