Overview
In cassandra data store used by course progress monitoring, few columns which are having date in string format. This results in date and timestamp mismatches when comparing with timezones.
Thus, in order to maintain standards and to address the date comparison issue, datatype migration of these columns from string to timestamp is required.
This document details about the approach taken for migration.
Design
In order to
Below table depicts the tables and columns to be migrated.
Keypsace.Table name | Existing columns | New columns |
---|---|---|
sunbird_courses.course_batch | createddate | created_date |
sunbird_courses.user_enrolments | enrolleddate | enrolled_date |
sunbird_courses.user_content_consumption | lastaccesstime lastcompletedtime lastupdatedtime | last_access_time last_completed_time last_updated_time |
sunbird.page_management | createddate | created_date |
sunbird.page_section | createddate | created_date |
Assumption
All the date timezones are in UTC, as per cassandra doc, timestamps are preferred with UTC.