Skip to content

Commit

Permalink
index torrents.FilePath to assist with folder clashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Spine committed May 6, 2021
1 parent c0d0c59 commit e97b93c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions db/migrations/20210103152728_index_torrent_path.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class IndexTorrentPath extends AbstractMigration
{
/**
* Change Method.
*
* Write your reversible migrations using this method.
*
* More information on writing migrations is available here:
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
*
* Remember to call "create()" or "update()" and NOT "save()" when working
* with the Table class.
*/
public function change(): void
{
$this->table('torrents')
->addIndex(['FilePath'], ['name' => 't_filepath_idx'])
->update();
}
}

0 comments on commit e97b93c

Please sign in to comment.