]> Untitled Git - lemmy.git/blob - migrations/2020-12-17-031053_remove_fast_tables_and_views/up.sql
Speedup CI (#3852)
[lemmy.git] / migrations / 2020-12-17-031053_remove_fast_tables_and_views / up.sql
1 -- Drop triggers
2 DROP TRIGGER IF EXISTS refresh_comment ON comment;
3
4 DROP TRIGGER IF EXISTS refresh_comment_like ON comment_like;
5
6 DROP TRIGGER IF EXISTS refresh_community ON community;
7
8 DROP TRIGGER IF EXISTS refresh_community_follower ON community_follower;
9
10 DROP TRIGGER IF EXISTS refresh_community_user_ban ON community_user_ban;
11
12 DROP TRIGGER IF EXISTS refresh_post ON post;
13
14 DROP TRIGGER IF EXISTS refresh_post_like ON post_like;
15
16 DROP TRIGGER IF EXISTS refresh_user ON user_;
17
18 -- Drop functions
19 DROP FUNCTION IF EXISTS refresh_comment, refresh_comment_like, refresh_community, refresh_community_follower, refresh_community_user_ban, refresh_post, refresh_post_like, refresh_private_message, refresh_user CASCADE;
20
21 -- Drop views
22 DROP VIEW IF EXISTS comment_aggregates_view, comment_fast_view, comment_report_view, comment_view, community_aggregates_view, community_fast_view, community_follower_view, community_moderator_view, community_user_ban_view, community_view, mod_add_community_view, mod_add_view, mod_ban_from_community_view, mod_ban_view, mod_lock_post_view, mod_remove_comment_view, mod_remove_community_view, mod_remove_post_view, mod_sticky_post_view, post_aggregates_view, post_fast_view, post_report_view, post_view, private_message_view, reply_fast_view, site_view, user_mention_fast_view, user_mention_view, user_view CASCADE;
23
24 -- Drop fast tables
25 DROP TABLE IF EXISTS comment_aggregates_fast, community_aggregates_fast, post_aggregates_fast, user_fast CASCADE;
26