diff options
| author | ckonstanski <carlos.konstanski@olo.com> | 2024-05-25 18:03:25 -0600 |
|---|---|---|
| committer | ckonstanski <carlos.konstanski@olo.com> | 2024-05-25 18:03:25 -0600 |
| commit | b8423f4d05c75094b7b9d09c6f0bb353acc9be1c (patch) | |
| tree | 3732f71f84191b26f038130c2220fb502d738251 /sql/functions/auth.registrations_gc.sql | |
initial commit
Diffstat (limited to 'sql/functions/auth.registrations_gc.sql')
| -rw-r--r-- | sql/functions/auth.registrations_gc.sql | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/functions/auth.registrations_gc.sql b/sql/functions/auth.registrations_gc.sql new file mode 100644 index 0000000..c1e1d90 --- /dev/null +++ b/sql/functions/auth.registrations_gc.sql @@ -0,0 +1,11 @@ +drop function auth.registrations_gc (); + +create or replace function auth.registrations_gc () +returns void +as $$ +begin + delete + from auth.registrations + where created < now() - interval '3 days'; +end; +$$ language plpgsql; |
