flashwave
ec00cfa176
To prevent personal discomfort with having to do database messages and seeing people's personal conversations. I haven't run into it yet, but I'd rather avoid it altogether.
15 lines
599 B
PHP
15 lines
599 B
PHP
<?php
|
|
use Index\Data\IDbConnection;
|
|
use Index\Data\Migration\IDbMigration;
|
|
|
|
final class BaseSixtyFourEncodePmsInDb_20240602_194809 implements IDbMigration {
|
|
public function migrate(IDbConnection $conn): void {
|
|
$conn->execute('UPDATE msz_messages SET msg_title = TO_BASE64(msg_title), msg_body = TO_BASE64(msg_body)');
|
|
$conn->execute('
|
|
ALTER TABLE `msz_messages`
|
|
CHANGE COLUMN `msg_title` `msg_title` TINYBLOB NOT NULL AFTER `msg_reply_to`,
|
|
CHANGE COLUMN `msg_body` `msg_body` BLOB NOT NULL AFTER `msg_title`;
|
|
');
|
|
}
|
|
}
|