-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
435 additions
and
18 deletions.
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
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
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
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
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
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
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
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
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
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,15 @@ | ||
CREATE OR REPLACE VIEW integration_subscriber_view AS ( | ||
SELECT subscribers.id, | ||
subscribers.slack_user_id, | ||
subscribers.slack_username, | ||
subscribers.slack_team_id, | ||
subscribers.search_term, | ||
subscribers.notify_time, | ||
oauth_integrations.domain AS slack_team_domain, | ||
oauth_integrations.bot_token AS slack_slash_token, | ||
oauth_integrations.webhook_url AS slack_webhook_url | ||
FROM subscribers | ||
INNER JOIN oauth_integrations ON (subscribers.slack_team_id = oauth_integrations.team_id) | ||
); | ||
|
||
ALTER TABLE subscribers DROP COLUMN is_admin; |
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,17 @@ | ||
ALTER TABLE subscribers | ||
ADD COLUMN is_admin BOOLEAN NOT NULL DEFAULT FALSE; | ||
|
||
CREATE OR REPLACE VIEW integration_subscriber_view AS ( | ||
SELECT subscribers.id, | ||
subscribers.slack_user_id, | ||
subscribers.slack_username, | ||
subscribers.slack_team_id, | ||
subscribers.search_term, | ||
subscribers.notify_time, | ||
subscribers.is_admin, | ||
oauth_integrations.domain AS slack_team_domain, | ||
oauth_integrations.bot_token AS slack_slash_token, | ||
oauth_integrations.webhook_url AS slack_webhook_url | ||
FROM subscribers | ||
INNER JOIN oauth_integrations ON (subscribers.slack_team_id = oauth_integrations.team_id) | ||
); |
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
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
Oops, something went wrong.