Add mandatory 'stored' option to generated column example
The current implementation (#41856) required `stored: true` to be passed when using `t.virtual()` https://github.com/rails/rails/pull/41856/files#diff-5b1b920fc3bebbb1d4c144b302603e5003a1d9e5a493e3234bf764b9e26fbe30R68-R75
This commit is contained in:
parent
e1a09e6e80
commit
447f55cc83
|
@ -562,7 +562,7 @@ create_table :documents do |t|
|
|||
t.string :body
|
||||
|
||||
t.virtual :textsearchable_index_col,
|
||||
type: :tsvector, as: "to_tsvector('english', title || ' ' || body)"
|
||||
type: :tsvector, as: "to_tsvector('english', title || ' ' || body)", stored: true
|
||||
end
|
||||
|
||||
add_index :documents, :textsearchable_index_col, using: :gin, name: 'documents_idx'
|
||||
|
|
Loading…
Reference in New Issue