From d62d1be05ca16a4836ad66440fda477f4ed6817a Mon Sep 17 00:00:00 2001 From: pennae Date: Wed, 13 Jul 2022 16:21:18 +0200 Subject: add downgrade migration for first schema version --- migrations/20220626163140_init.down.sql | 45 ++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/migrations/20220626163140_init.down.sql b/migrations/20220626163140_init.down.sql index 8b13789..17d2564 100644 --- a/migrations/20220626163140_init.down.sql +++ b/migrations/20220626163140_init.down.sql @@ -1 +1,44 @@ - +drop procedure prune_expired_verify_codes; +drop procedure prune_expired_tokens; +drop table invite_codes; +drop procedure reset_user_auth; +drop table account_reset_tokens; +drop table password_change_tokens; +drop index oauth_authorization__expires_at__idx; +drop table oauth_authorization; +drop trigger device__cascade_ on device; +drop function cascade_device_delete; +drop trigger oauth_token__cascade_session on oauth_token; +drop function cascade_oauth_delete; +drop index oauth_token__expires_at__idx; +drop table oauth_token; +drop index key_fetch__expires_at__idx; +drop table key_fetch; +drop index device_command__expires__idx; +drop index device_command__device_id__idx; +drop table device_commands; +drop table verify_codes; +drop trigger user_session__cascade_device on user_session; +drop function cascade_session_delete; +drop table user_session; +drop function insert_or_update_device; +drop table device; +drop table user_avatars; +drop index user__email__idx; +drop table users; +drop type device_push_info; +drop type device_command; +drop type oauth_access_type; +drop type oauth_token_kind; +drop domain avatar_id; +drop domain account_reset_id; +drop domain password_change_id; +drop domain verify_hash; +drop domain secret_key; +drop domain oauth_auth_id; +drop domain oauth_token_id; +drop domain key_fetch_id; +drop domain device_id; +drop domain hawk_key; +drop domain user_id; +drop domain session_id; -- cgit v1.2.3