18 lines
590 B
PHP
18 lines
590 B
PHP
<?php
|
|
use Index\Db\DbConnection;
|
|
use Index\Db\Migration\DbMigration;
|
|
|
|
final class RemoveLocalUsersTable_20250103_190130 implements DbMigration {
|
|
public function migrate(DbConnection $conn): void {
|
|
// Remove foreign key from prm_uploads
|
|
$conn->execute(<<<SQL
|
|
ALTER TABLE prm_uploads
|
|
DROP INDEX prm_uploads_user_foreign,
|
|
ADD INDEX prm_uploads_user_index (user_id) USING BTREE,
|
|
DROP FOREIGN KEY prm_uploads_user_foreign
|
|
SQL);
|
|
|
|
// Nuke table
|
|
$conn->execute('DROP TABLE prm_users');
|
|
}
|
|
}
|