remove use of rust in migration (#704)
* remove use of rust in migration rewrite use_timelines_for_feed in pure sql delete tantivy related migration. It will require reintroducing tantivy initialisation in docs fix #702 * Fill timeline from migrations should fix #692 , but probably require some testing
This commit is contained in:
@@ -1,17 +1,6 @@
|
||||
-- Your SQL goes here
|
||||
--#!|conn: &Connection, path: &Path| {
|
||||
--#! super::timeline::Timeline::new_for_instance(conn, "Local feed".into(), "local".into()).expect("Local feed creation error");
|
||||
--#! super::timeline::Timeline::new_for_instance(conn, "Federated feed".into(), "all".into()).expect("Federated feed creation error");
|
||||
--#!
|
||||
--#! for i in 0.. {
|
||||
--#! if let Some(users) = super::users::User::get_local_page(conn, (i * 20, (i + 1) * 20)).ok().filter(|l| !l.is_empty()) {
|
||||
--#! for u in users {
|
||||
--#! super::timeline::Timeline::new_for_user(conn, u.id, "Your feed".into(), format!("followed or author in [ {} ]", u.fqn)).expect("User feed creation error");
|
||||
--#! }
|
||||
--#! } else {
|
||||
--#! break;
|
||||
--#! }
|
||||
--#! }
|
||||
--#!
|
||||
--#! Ok(())
|
||||
--#!}
|
||||
INSERT INTO timeline_definition (name, query) VALUES
|
||||
('Local feed', 'local'),
|
||||
('Federated feed', 'all');
|
||||
INSERT INTO timeline_definition (user_id,name,query)
|
||||
select id,'Your feed','followed or ['||fqn||']' from users;
|
||||
|
||||
Reference in New Issue
Block a user