-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add migration script in order to remove existing mpm channels from da…
…tabase
- Loading branch information
elfaus
committed
Aug 27, 2016
1 parent
b20da19
commit 23461b5
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/database/migrations/2016_08_27_174000_delete_mpm_records.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Seat\Slackbot\Models\SlackChannel; | ||
|
||
class DeleteMpmRecords extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
SlackChannel::where('name', 'LIKE', 'mpdm-%') | ||
->where('is_group', true) | ||
->delete(); | ||
} | ||
} |