[Jitera] Create/Update models and migrations
Created by: akuita
This pull request is created by JITERA
Description
[ERD] Changes
| table | guideline | type | columns |
|---|---|---|---|
| users | This file is already existed. Update the User model to include new attributes and relationships. Ensure that each attribute has the correct data type and constraints. For example, add the following lines for new attributes: |
- add
sign_in_count:integer,remember_created_at:datetime,current_sign_in_ip:string,locked_at:datetime, etc. Also, define the relationships with other tables: - has_one :email_confirmation
- has_many :password_management_integrations Remember to include validations for the email and password fields. | UPDATED | id: integer, sign_in_count: integer, remember_created_at: date, current_sign_in_ip: varchar, locked_at: date, encrypted_password: varchar, confirmed_at: date, failed_attempts: integer, last_sign_in_ip: varchar, confirmation_token: varchar, unconfirmed_email: varchar, email: varchar, reset_password_token: varchar, password_confirmation: varchar, last_sign_in_at: date, reset_password_sent_at: date, password: varchar, unlock_token: varchar, current_sign_in_at: date, confirmation_sent_at: date, created_at: date, updated_at: date, password_hash: varchar, email_confirmed: boolean | | email_confirmations | This file is already existed. Update the User model to include new attributes and relationships. Ensure that each attribute has the correct data type and constraints. For example, add the following lines for new attributes:
- add
sign_in_count:integer,remember_created_at:datetime,current_sign_in_ip:string,locked_at:datetime, etc. Also, define the relationships with other tables: - has_one :email_confirmation
- has_many :password_management_integrations Remember to include validations for the email and password fields. | ADDED | id: integer, created_at: date, updated_at: date, token: varchar, confirmed: boolean, expires_at: date, user_id: integer | | password_management_integrations | This file is already existed. Update the User model to include new attributes and relationships. Ensure that each attribute has the correct data type and constraints. For example, add the following lines for new attributes:
- add
sign_in_count:integer,remember_created_at:datetime,current_sign_in_ip:string,locked_at:datetime, etc. Also, define the relationships with other tables: - has_one :email_confirmation
- has_many :password_management_integrations Remember to include validations for the email and password fields. | ADDED | id: integer, created_at: date, updated_at: date, tool_name: enum (1Password, iCloud Password), integration_data: text, user_id: integer |