mirror of https://github.com/jlelse/GoBlog
Fix search not including posts without title
This commit is contained in:
parent
a18b014eb5
commit
4508b8569f
|
@ -170,6 +170,17 @@ func migrateDb(db *sql.DB, logging bool) error {
|
|||
return err
|
||||
},
|
||||
},
|
||||
&migrator.Migration{
|
||||
Name: "00015",
|
||||
Func: func(tx *sql.Tx) error {
|
||||
_, err := tx.Exec(`
|
||||
drop view view_posts_with_title;
|
||||
create view view_posts_with_title as select p.rowid as id, p.path as path, coalesce(pp.value, '') as title, content, published, updated, blog, section, status from posts p left outer join (select * from post_parameters pp where pp.parameter = 'title') pp on p.path = pp.path;
|
||||
insert into posts_fts(posts_fts) values ('rebuild');
|
||||
`)
|
||||
return err
|
||||
},
|
||||
},
|
||||
),
|
||||
)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue