Skip to content

Commit

Permalink
Include schema in tsort
Browse files Browse the repository at this point in the history
  • Loading branch information
calebhearth committed Mar 5, 2024
1 parent 3f56996 commit 4051f08
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/scenic/schema_dumper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,14 @@ def tsorted_views(views_names)
views_hash = TSortableHash.new

::Scenic.database.execute(DEPENDENT_SQL).each do |relation|
source_v = relation["source_table"]
dependent = relation["dependent_view"]
source_v = [
relation["source_schema"],
relation["source_table"],

Check failure on line 72 in lib/scenic/schema_dumper.rb

View workflow job for this annotation

GitHub Actions / Lint with Standard

Style/TrailingCommaInArrayLiteral: Avoid comma after the last item of an array.
].compact.join(".")
dependent = [
relation["dependent_schema"],
relation["dependent_view"],

Check failure on line 76 in lib/scenic/schema_dumper.rb

View workflow job for this annotation

GitHub Actions / Lint with Standard

Style/TrailingCommaInArrayLiteral: Avoid comma after the last item of an array.
].compact.join(".")
views_hash[dependent] ||= []
views_hash[source_v] ||= []
views_hash[dependent] << source_v
Expand Down

0 comments on commit 4051f08

Please sign in to comment.