Skip to content

Commit

Permalink
index creation migration file
Browse files Browse the repository at this point in the history
Signed-off-by: Smita Kumari <kumarismita62@gmail.com>
  • Loading branch information
smita786 committed Jun 8, 2015
1 parent 1c83700 commit d9d7eaf
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
@@ -0,0 +1,22 @@
<?php
use Phinx\Migration\AbstractMigration;

class AddReportIdIndexToIncidents extends AbstractMigration
{
/**
* Change Method.
*
* More information on this method is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-change-method
* @return void
*/
public function change()
{
$table = $this->table('incidents');
$table->addIndex(
[
'report_id',
]);
$table->update();
}
}
@@ -0,0 +1,22 @@
<?php
use Phinx\Migration\AbstractMigration;

class AddDevReportIndexToNotifications extends AbstractMigration
{
/**
* Change Method.
*
* More information on this method is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-change-method
* @return void
*/
public function change()
{
$table = $this->table('notifications');
$table->addIndex([
'developer_id',
'report_id',
]);
$table->update();
}
}

0 comments on commit d9d7eaf

Please sign in to comment.