jaeyun0503 opened a new pull request, #3736: URL: https://github.com/apache/texera/pull/3736
## Context In effort to improve admin dashboard and allow admins to view account creation time, a new column `account_creation_time` is introduced to the `user` table. This attribute is meant to store the timestamp of a user's account creation time and is a required column of the table. Existing user rows have been given a set time for the column. Closes Issue #3673. ## For Developers Please do the following steps to incorporate with new changes: - Apply core/scripts/sql/updates/14.sql to your local postgres instance ## Summary of Feature When a new user is added to the system (created by admin or google login), the user's information will be logged into the database. The `NOT NULL ON DEFAULT SET now()` statement would make sure that every user's account creation time is logged. And admins will be able to view every user's account creation time in the admin dashboard. ## Database Change A new column `account_creation_time` has been added to the `user` table and is set to `NOT NULL`. On default when a new user is inserted into the table, the creation time for the user will be the current timestamp. Attached below are the current & proposed schema of the `user` table. ## Codebase Change To cooperate with the change, we added a new attribute `accountCreation` to `user.ts` to ensure the frontend receives the account creation time from the backend. Multiple files have been changed as adding the not null attribute to `user.ts` required changes to those files. ## Current Schema <img width="276" height="277" alt="image" src="https://github.com/user-attachments/assets/efffa9a0-ea4a-4ef1-8a28-435f59b83d6d" /> ## Proposed Schema <img width="270" height="303" alt="image" src="https://github.com/user-attachments/assets/3271d5f0-b2da-4b6e-9756-15e9289d6a86" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
