Skip to main content

Retention Periods

AI-School offers the ability to set retention periods per collection. A collection is a set of similar data. For example, there is a "Schools" collection and a "Chats" collection.

For some collections, this option is not available. This is the case for data where it is not logical for them to automatically expire after an end date.

Setting Retention Periods

The board admin can set retention periods in the environment, under the "Data retention" section.

Setting Retention Periods

Default values have already been set, but these can be modified per environment.

  • lessons, chats, and chat messages are deleted after 3 months
  • groups and lesson groups are deleted at the beginning of each school year (August 1st)
  • students and staff are deleted after 8 years

How Data Retention Works

When adding a new record to the collection, an automatic expiration date is immediately calculated based on the Data retention settings.

For example, if a chat is added on April 18, 2024, and the data retention is set to 3 months, an expiration date of July 18, 2024, will be assigned to the record.

We use the Firebase TTL policy functionality. Firebase detects the expiration date field and automatically cleans up records that are past the expiration date. This happens approximately 24 hours after the expiration date.

Time To Live Policy Firebase