How to Reset Team Calendar Subscription of a User

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

You are an administrator of Confluence and you want to remove all calendar subscriptions from a user.

Resolution

Please back up your database before making any of the changes below. Please note that this is not supported and it is only meant to be a guide.

In order to delete all calendar subscriptions of a single user:

  1. Shut down Confluence
  2. Find the user_key of the user by executing the SQL:

    SELECT * FROM user_mapping WHERE username = '<username>';

    Take note of the user_key column

  3. Execute the DELETE SQL query below. Replace CREATOR values with the user_key values obtained from step 2:

    DELETE FROM "AO_950DC3_TC_SUBCALS" WHERE "CREATOR" = '<user_key>' AND "SUBSCRIPTION_ID" IS NOT NULL;

    This will remove all subscriptions to calendars other than the calendar that the user created on its own.

    1. (lightbulb) If you get an FK violation error for 'fk_ao_950dc3_tc_subcals_parent_id' while running the above query, please try the below alternative as it removes the records that have FK relation through the 'PARENT_ID' column then proceeds with the deletion of parent records:

      DELETE FROM "AO_950DC3_TC_SUBCALS" WHERE "CREATOR" = '<user_key>' AND "SUBSCRIPTION_ID" IS NOT NULL AND "PARENT_ID" IS NOT NULL;
      DELETE FROM "AO_950DC3_TC_SUBCALS" WHERE "CREATOR" = '<user_key>' AND "SUBSCRIPTION_ID" IS NOT NULL AND "PARENT_ID" IS NULL;
  4. Start Confluence

Last modified on Feb 10, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.