Skip to content

Commit

Permalink
Added vschema setup for query interface guide (#147)
Browse files Browse the repository at this point in the history
Signed-off-by: GuptaManan100 <[email protected]>
  • Loading branch information
GuptaManan100 authored Apr 21, 2021
1 parent 0d1f5c5 commit 20e2852
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
13 changes: 13 additions & 0 deletions frameworks/ruby/rails6/rails-guide/initialVschemaSetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,16 @@ add_sequence_and_vindex "part5s"
add_sequence_and_vindex "manufacturers"
add_binary_md5_vindex "assembly5s_part5s" "part5_id"
add_binary_md5_vindex "manufacturers_part5s" "part5_id"

# Query Interface
add_sequence_and_vindex "author5s"
add_sequence_and_vindex "supplier5s"
add_binary_md5_vindex "book6s" "author5_id"
add_sequence_table "book6s"
add_sequence_and_vindex "customer2s"
add_binary_md5_vindex "order2s" "customer2_id"
add_sequence_table "order2s"
add_binary_md5_vindex "reviews" "customer2_id"
add_sequence_table "reviews"
add_binary_md5_vindex "book6s_order2s" "book6_id"

Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def change
end

create_table :book6s do |t|
t.belongs_to :author5, foreign_key: true
t.belongs_to :supplier5, foreign_key: true
t.belongs_to :author5
t.belongs_to :supplier5
t.string :title
t.integer :price
t.integer :year_published
Expand All @@ -34,8 +34,8 @@ def change
end

create_table :reviews do |t|
t.belongs_to :customer2, foreign_key: true
t.belongs_to :book6, foreign_key: true
t.belongs_to :customer2
t.belongs_to :book6
t.integer :state
t.integer :rating
t.string :review
Expand Down

0 comments on commit 20e2852

Please sign in to comment.