Skip to content

Commit

Permalink
add migration script in order to remove existing mpm channels from da…
Browse files Browse the repository at this point in the history
…tabase
  • Loading branch information
elfaus committed Aug 27, 2016
1 parent b20da19 commit 23461b5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Version 0.7.2
remove MPM channels from private channels list

# Version 0.7.0
fix log issues which was logging event even when they didn't happen.
rename slack command
exclude general channel from member list and add general flag to channels

**Warning**
> This update is an upgrade and need a migration, run `php artisan migrate` command in order to update schemas.
> This update is an upgrade and need a migration. Run `php artisan migrate` command in order to update schemas.
> This update replace `slack:update:channels` and `slack:update:users` with `slack:channels:update`
and `slack:users:update` respectively.
Expand Down
19 changes: 19 additions & 0 deletions src/database/migrations/2016_08_27_174000_delete_mpm_records.php
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();
}
}

0 comments on commit 23461b5

Please sign in to comment.