Skip to content

Conversation

@martindolores
Copy link

Description

  • Modify 'users' table to include total_tutor_time

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  1. In your terminal, change directory to doubtfire-api - if you are in doubtfire-deploy, simply run the following:
cd doubtfire-api
  1. Run the following to apply pending migrations and update your database schema:
rails db:migrate
  1. Run the following to access the Ruby shell:
rails console
  1. Finally, confirm that the total_tutor_time has been added to users table has been added. You can run this in the Ruby shell to return all the columns of the table:
User.column_names

image

Checklist

If involving code

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation - There is existing ticket in Backlog to update documentation for Backend - Tutor Times
  • My changes generate no new warnings

Folders and Files Added/Modified

  • Added:

    • db/migrate/20250326085802_add_total_tutor_time_to_users
  • Modified:

    • db/schema.rb
    • app/models/user.rb

Copy link

@EkamBhullar EkamBhullar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The migration successfully adds total_tutor_time to the users table. The schema and model changes are correctly applied, and testing confirms the new column exists.

@amriith
Copy link

amriith commented Apr 1, 2025

Hi @martindolores Everything looks perfect! The code is clean, follows best practices, and works as expected. Reviewed the latest user.rb as well and everything checks out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants