2024-09-16 21:44:37 +00:00
|
|
|
<?php
|
2024-10-05 02:40:29 +00:00
|
|
|
use Index\Db\DbConnection;
|
|
|
|
use Index\Db\Migration\DbMigration;
|
2024-09-16 21:44:37 +00:00
|
|
|
|
2024-10-05 02:40:29 +00:00
|
|
|
final class AddRoleIdString_20240916_205613 implements DbMigration {
|
|
|
|
public function migrate(DbConnection $conn): void {
|
2024-09-16 21:44:37 +00:00
|
|
|
$conn->execute(<<<SQL
|
|
|
|
ALTER TABLE msz_roles
|
|
|
|
ADD COLUMN role_string VARCHAR(20) NULL DEFAULT NULL COLLATE 'ascii_general_ci' AFTER role_id,
|
|
|
|
ADD UNIQUE INDEX roles_string_unique (role_string);
|
|
|
|
SQL);
|
|
|
|
}
|
|
|
|
}
|