fix create_view in schema.rb

Scenic created this with the name of the prod database and broke Travis.
This commit is contained in:
Andrew Shu 2018-02-09 06:46:08 -08:00 committed by Peter Bhat Harkins
parent 33b333c7ed
commit f39ad5a09d
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ ActiveRecord::Schema.define(version: 20180201184612) do
create_view "replying_comments", sql_definition: <<-SQL
select `lobsters`.`read_ribbons`.`user_id` AS `user_id`,`lobsters`.`comments`.`id` AS `comment_id`,`lobsters`.`read_ribbons`.`story_id` AS `story_id`,`lobsters`.`comments`.`parent_comment_id` AS `parent_comment_id`,`lobsters`.`comments`.`created_at` AS `comment_created_at`,`parent_comments`.`user_id` AS `parent_comment_author_id`,`lobsters`.`comments`.`user_id` AS `comment_author_id`,`lobsters`.`stories`.`user_id` AS `story_author_id`,(`lobsters`.`read_ribbons`.`updated_at` < `lobsters`.`comments`.`created_at`) AS `is_unread`,(select `lobsters`.`votes`.`vote` from `lobsters`.`votes` where ((`lobsters`.`votes`.`user_id` = `lobsters`.`read_ribbons`.`user_id`) and (`lobsters`.`votes`.`comment_id` = `lobsters`.`comments`.`id`))) AS `current_vote_vote`,(select `lobsters`.`votes`.`reason` from `lobsters`.`votes` where ((`lobsters`.`votes`.`user_id` = `lobsters`.`read_ribbons`.`user_id`) and (`lobsters`.`votes`.`comment_id` = `lobsters`.`comments`.`id`))) AS `current_vote_reason` from (((`lobsters`.`read_ribbons` join `lobsters`.`comments` on((`lobsters`.`comments`.`story_id` = `lobsters`.`read_ribbons`.`story_id`))) join `lobsters`.`stories` on((`lobsters`.`stories`.`id` = `lobsters`.`comments`.`story_id`))) left join `lobsters`.`comments` `parent_comments` on((`parent_comments`.`id` = `lobsters`.`comments`.`parent_comment_id`))) where ((`lobsters`.`read_ribbons`.`is_following` = 1) and (`lobsters`.`comments`.`user_id` <> `lobsters`.`read_ribbons`.`user_id`) and (`lobsters`.`comments`.`is_deleted` = 0) and (`lobsters`.`comments`.`is_moderated` = 0) and ((`parent_comments`.`user_id` = `lobsters`.`read_ribbons`.`user_id`) or (isnull(`parent_comments`.`user_id`) and (`lobsters`.`stories`.`user_id` = `lobsters`.`read_ribbons`.`user_id`))) and ((`lobsters`.`comments`.`upvotes` - `lobsters`.`comments`.`downvotes`) >= 0) and (isnull(`parent_comments`.`id`) or ((`parent_comments`.`upvotes` - `parent_comments`.`downvotes`) >= 0)))
select `read_ribbons`.`user_id` AS `user_id`,`comments`.`id` AS `comment_id`,`read_ribbons`.`story_id` AS `story_id`,`comments`.`parent_comment_id` AS `parent_comment_id`,`comments`.`created_at` AS `comment_created_at`,`parent_comments`.`user_id` AS `parent_comment_author_id`,`comments`.`user_id` AS `comment_author_id`,`stories`.`user_id` AS `story_author_id`,(`read_ribbons`.`updated_at` < `comments`.`created_at`) AS `is_unread`,(select `votes`.`vote` from `votes` where ((`votes`.`user_id` = `read_ribbons`.`user_id`) and (`votes`.`comment_id` = `comments`.`id`))) AS `current_vote_vote`,(select `votes`.`reason` from `votes` where ((`votes`.`user_id` = `read_ribbons`.`user_id`) and (`votes`.`comment_id` = `comments`.`id`))) AS `current_vote_reason` from (((`read_ribbons` join `comments` on((`comments`.`story_id` = `read_ribbons`.`story_id`))) join `stories` on((`stories`.`id` = `comments`.`story_id`))) left join `comments` `parent_comments` on((`parent_comments`.`id` = `comments`.`parent_comment_id`))) where ((`read_ribbons`.`is_following` = 1) and (`comments`.`user_id` <> `read_ribbons`.`user_id`) and (`comments`.`is_deleted` = 0) and (`comments`.`is_moderated` = 0) and ((`parent_comments`.`user_id` = `read_ribbons`.`user_id`) or (isnull(`parent_comments`.`user_id`) and (`stories`.`user_id` = `read_ribbons`.`user_id`))) and ((`comments`.`upvotes` - `comments`.`downvotes`) >= 0) and (isnull(`parent_comments`.`id`) or ((`parent_comments`.`upvotes` - `parent_comments`.`downvotes`) >= 0)))
SQL
end