@@ -20,6 +20,8 @@ class HoverTest < ActiveSupport::TestCase
2020 [ "active" , "boolean" , "true" , false ] ,
2121 ] ,
2222 primary_keys : [ "id" ] ,
23+ foreign_keys : [ "country_id" ] ,
24+ indexes : [ { name : "index_users_on_country_id" , columns : [ "country_id" ] , unique : false } ] ,
2325 }
2426
2527 RunnerClient . any_instance . stubs ( model : expected_response )
@@ -41,21 +43,25 @@ class User < ApplicationRecord
4143
4244 [Schema](#{ URI ::Generic . from_path ( path : dummy_root + "/db/schema.rb" ) } )
4345
44- **id**: integer (PK)
46+ ### Columns
47+ - **id**: integer (PK)
4548
46- **first_name**: string - default: ""
49+ - **first_name**: string - default: ""
4750
48- **last_name**: string
51+ - **last_name**: string
4952
50- **age**: integer - default: 0
53+ - **age**: integer - default: 0
5154
52- **created_at**: datetime - not null
55+ - **created_at**: datetime - not null
5356
54- **updated_at**: datetime - not null
57+ - **updated_at**: datetime - not null
5558
56- **country_id**: integer - not null
59+ - **country_id**: integer (FK) - not null
5760
58- **active**: boolean - default: true - not null
61+ - **active**: boolean - default: true - not null
62+
63+ ### Indexes
64+ - **index_users_on_country_id** (country_id)
5965 CONTENT
6066 end
6167
@@ -73,6 +79,8 @@ class User < ApplicationRecord
7379 [ "active" , "boolean" , "true" , false ] ,
7480 ] ,
7581 primary_keys : [ "id" ] ,
82+ foreign_keys : [ ] ,
83+ indexes : [ { name : "index_users_on_country_id" , columns : [ "country_id" ] , unique : true } ] ,
7684 }
7785
7886 RunnerClient . any_instance . stubs ( model : expected_response )
@@ -96,21 +104,25 @@ class User < ApplicationRecord
96104
97105 [Schema](#{ URI ::Generic . from_path ( path : dummy_root + "/db/schema.rb" ) } )
98106
99- **id**: integer (PK)
107+ ### Columns
108+ - **id**: integer (PK)
109+
110+ - **first_name**: string - default: ""
100111
101- **first_name **: string - default: ""
112+ - **last_name **: string
102113
103- **last_name **: string
114+ - **age **: integer - default: 0
104115
105- **age **: integer - default: 0
116+ - **created_at **: datetime - not null
106117
107- **created_at **: datetime - not null
118+ - **updated_at **: datetime - not null
108119
109- **updated_at **: datetime - not null
120+ - **country_id **: integer - not null
110121
111- **country_id **: integer - not null
122+ - **active **: boolean - default: true - not null
112123
113- **active**: boolean - default: true - not null
124+ ### Indexes
125+ - **index_users_on_country_id** (country_id) (unique)
114126 CONTENT
115127 end
116128
@@ -125,6 +137,8 @@ class User < ApplicationRecord
125137 [ "updated_at" , "datetime" ] ,
126138 ] ,
127139 primary_keys : [ "order_id" , "product_id" ] ,
140+ foreign_keys : [ ] ,
141+ indexes : [ ] ,
128142 }
129143
130144 RunnerClient . any_instance . stubs ( model : expected_response )
@@ -146,15 +160,16 @@ class CompositePrimaryKey < ApplicationRecord
146160
147161 [Schema](#{ URI ::Generic . from_path ( path : dummy_root + "/db/schema.rb" ) } )
148162
149- **order_id**: integer (PK)
163+ ### Columns
164+ - **order_id**: integer (PK)
150165
151- **product_id**: integer (PK)
166+ - **product_id**: integer (PK)
152167
153- **note**: string - not null
168+ - **note**: string - not null
154169
155- **created_at**: datetime - not null
170+ - **created_at**: datetime - not null
156171
157- **updated_at**: datetime - not null
172+ - **updated_at**: datetime - not null
158173 CONTENT
159174 end
160175
@@ -163,6 +178,8 @@ class CompositePrimaryKey < ApplicationRecord
163178 schema_file : "#{ dummy_root } /db/structure.sql" ,
164179 columns : [ ] ,
165180 primary_keys : [ ] ,
181+ foreign_keys : [ ] ,
182+ indexes : [ ] ,
166183 }
167184
168185 RunnerClient . any_instance . stubs ( model : expected_response )
@@ -185,6 +202,8 @@ class User < ApplicationRecord
185202 schema_file : nil ,
186203 columns : [ ] ,
187204 primary_keys : [ ] ,
205+ foreign_keys : [ ] ,
206+ indexes : [ ] ,
188207 }
189208
190209 RunnerClient . any_instance . stubs ( model : expected_response )
0 commit comments