Skip to content

Commit

Permalink
Fix database migration table and index length
Browse files Browse the repository at this point in the history
  • Loading branch information
e-alfred committed Dec 29, 2020
1 parent feb521e commit 224382c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
'length' => 1,
]);
$table->setPrimaryKey(['id']);
$table->addIndex(['user_id', 'sms_mailbox'], 'smsdata_user_mailbox');
$table->addIndex(['user_id', 'sms_mailbox'], 'smsdata_user_mbox');
$table->addIndex(['user_id', 'sms_id'], 'smsdata_user_smsid');
$table->addIndex(['user_id', 'sms_mailbox', 'sms_date'], 'smsdata_user_mailbox_date');
$table->addIndex(['user_id', 'sms_mailbox', 'sms_address'], 'smsdata_user_mailbox_address');
$table->addIndex(['user_id', 'sms_mailbox', 'sms_address', 'sms_date'], 'smsdata_user_mailbox_address_date');
$table->addIndex(['user_id', 'sms_mailbox', 'sms_date'], 'smsdata_user_mbox_date');
$table->addIndex(['user_id', 'sms_mailbox', 'sms_address'], 'smsdata_user_mbox_addr');
$table->addIndex(['user_id', 'sms_mailbox', 'sms_address', 'sms_date'], 'smsdata_user_mbox_addr_date');
}

if (!$schema->hasTable('ocsms_sendmessage_queue')) {
$table = $schema->createTable('ocsms_sendmessage_queue');
if (!$schema->hasTable('ocsms_sendmess_queue')) {
$table = $schema->createTable('ocsms_sendmess_queue');
$table->addColumn('id', 'bigint', [
'autoincrement' => true,
'notnull' => true,
Expand All @@ -127,8 +127,8 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
$table->setPrimaryKey(['id']);
}

if (!$schema->hasTable('ocsms_conversation_read_states')) {
$table = $schema->createTable('ocsms_conversation_read_states');
if (!$schema->hasTable('ocsms_conv_r_states')) {
$table = $schema->createTable('ocsms_conv_r_states');
$table->addColumn('user_id', 'string', [
'notnull' => true,
'length' => 64,
Expand Down
File renamed without changes.

0 comments on commit 224382c

Please sign in to comment.