mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Update up.sql
This commit is contained in:
parent
465440491d
commit
f4dd7887fd
@ -1,7 +1,5 @@
|
|||||||
-- Change triggers to run once per statement instead of once per row
|
-- Change triggers to run once per statement instead of once per row
|
||||||
|
|
||||||
-- post_aggregates_post trigger doesn't need to handle deletion because the post_id column has ON DELETE CASCADE
|
-- post_aggregates_post trigger doesn't need to handle deletion because the post_id column has ON DELETE CASCADE
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION post_aggregates_post ()
|
CREATE OR REPLACE FUNCTION post_aggregates_post ()
|
||||||
RETURNS TRIGGER
|
RETURNS TRIGGER
|
||||||
LANGUAGE plpgsql
|
LANGUAGE plpgsql
|
||||||
@ -81,7 +79,6 @@ CREATE OR REPLACE TRIGGER post_aggregates_post
|
|||||||
EXECUTE PROCEDURE post_aggregates_post ();
|
EXECUTE PROCEDURE post_aggregates_post ();
|
||||||
|
|
||||||
-- Don't run old trigger for insert
|
-- Don't run old trigger for insert
|
||||||
|
|
||||||
CREATE OR REPLACE TRIGGER community_aggregates_post_count
|
CREATE OR REPLACE TRIGGER community_aggregates_post_count
|
||||||
AFTER DELETE OR UPDATE OF removed,
|
AFTER DELETE OR UPDATE OF removed,
|
||||||
deleted ON post
|
deleted ON post
|
||||||
@ -159,7 +156,6 @@ CREATE OR REPLACE TRIGGER person_aggregates_post_insert
|
|||||||
EXECUTE PROCEDURE person_aggregates_post_insert ();
|
EXECUTE PROCEDURE person_aggregates_post_insert ();
|
||||||
|
|
||||||
-- Avoid running hash function and random number generation for default ap_id
|
-- Avoid running hash function and random number generation for default ap_id
|
||||||
|
|
||||||
CREATE SEQUENCE IF NOT EXISTS changeme_seq AS bigint CYCLE;
|
CREATE SEQUENCE IF NOT EXISTS changeme_seq AS bigint CYCLE;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION generate_unique_changeme ()
|
CREATE OR REPLACE FUNCTION generate_unique_changeme ()
|
||||||
|
Loading…
Reference in New Issue
Block a user