Commit 890a2b32 authored by Stephane Crozat's avatar Stephane Crozat
Browse files

Adding deletion of system_join_team message (along with system_join_channel)

parent 557608c6
......@@ -13,5 +13,5 @@ export PGDATABASE=$POSTGRES_DB
export PGUSER=$POSTGRES_USER
export PGPASSWORD=$POSTGRES_PASS
SQL_CMD="DELETE FROM posts WHERE id IN (SELECT p.id FROM posts p LEFT JOIN channels c ON p.channelid=c.id LEFT JOIN teams t ON c.teamid=t.id WHERE p.type='system_join_channel' AND t.name = '${MATTERMOST_TEAM}')"
SQL_CMD="DELETE FROM posts WHERE id IN (SELECT p.id FROM posts p LEFT JOIN channels c ON p.channelid=c.id LEFT JOIN teams t ON c.teamid=t.id WHERE (p.type='system_join_channel' OR p.type='system_join_team') AND t.name = '${MATTERMOST_TEAM}')"
psql -c "${SQL_CMD}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment