This repository was archived by the owner on Jul 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33class InferredConceptPost < ActiveRecord ::Base
4- self . table_name = "inferred_concepts_posts"
5-
64 belongs_to :inferred_concept
75 belongs_to :post
86
@@ -13,7 +11,7 @@ class InferredConceptPost < ActiveRecord::Base
1311
1412# == Schema Information
1513#
16- # Table name: inferred_concepts_posts
14+ # Table name: inferred_concept_posts
1715#
1816# inferred_concept_id :bigint
1917# post_id :bigint
@@ -22,6 +20,6 @@ class InferredConceptPost < ActiveRecord::Base
2220#
2321# Indexes
2422#
25- # index_inferred_concepts_posts_on_inferred_concept_id (inferred_concept_id)
26- # index_inferred_concepts_posts_uniqueness (post_id,inferred_concept_id) UNIQUE
23+ # index_inferred_concept_posts_on_inferred_concept_id (inferred_concept_id)
24+ # index_inferred_concept_posts_uniqueness (post_id,inferred_concept_id) UNIQUE
2725#
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33class InferredConceptTopic < ActiveRecord ::Base
4- self . table_name = "inferred_concepts_topics"
5-
64 belongs_to :inferred_concept
75 belongs_to :topic
86
@@ -13,7 +11,7 @@ class InferredConceptTopic < ActiveRecord::Base
1311
1412# == Schema Information
1513#
16- # Table name: inferred_concepts_topics
14+ # Table name: inferred_concept_topics
1715#
1816# inferred_concept_id :bigint
1917# topic_id :bigint
@@ -22,6 +20,6 @@ class InferredConceptTopic < ActiveRecord::Base
2220#
2321# Indexes
2422#
25- # index_inferred_concepts_topics_on_inferred_concept_id (inferred_concept_id)
26- # index_inferred_concepts_topics_uniqueness (topic_id,inferred_concept_id) UNIQUE
23+ # index_inferred_concepts_topic_on_inferred_concept_id (inferred_concept_id)
24+ # index_inferred_concepts_topic_uniqueness (topic_id,inferred_concept_id) UNIQUE
2725#
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ def find_candidate_topics(
7979 # Exclude topics that already have concepts
8080 topics_with_concepts = <<~SQL
8181 SELECT DISTINCT topic_id
82- FROM inferred_concepts_topics
82+ FROM inferred_concept_topics
8383 SQL
8484
8585 query = query . where ( "topics.id NOT IN (#{ topics_with_concepts } )" )
@@ -129,7 +129,7 @@ def find_candidate_posts(
129129 # Exclude posts that already have concepts
130130 posts_with_concepts = <<~SQL
131131 SELECT DISTINCT post_id
132- FROM inferred_concepts_posts
132+ FROM inferred_concept_posts
133133 SQL
134134
135135 query = query . where ( "posts.id NOT IN (#{ posts_with_concepts } )" )
You can’t perform that action at this time.
0 commit comments