function multiple_registration_update_8202 in Multiple Registration 8.2
Same name and namespace in other branches
- 3.x multiple_registration.install \multiple_registration_update_8202()
Create database schema to store the correspondent rid for each user.
File
Code
function multiple_registration_update_8202() {
$spec = [
'description' => 'Stores the correspondent rid for each user.',
'fields' => [
'uid' => [
'description' => 'The User ID.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
'rid' => [
'description' => 'The identifier of the multiple_registration page definition.',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
],
],
'foreign keys' => [
'uid' => [
'users' => 'uid',
],
],
];
$schema = Database::getConnection()
->schema();
$schema
->createTable('multiple_registration', $spec);
}