Changing a birthday image

Changing a birthday image

          1.   IP address, username,password of the server.

         2.  MySQL  password and username


         Step 1:   Firstly, log into the server using appropriate credentials.

                                  ssh -o TCPKeepAlive=yes -o ServerAliveInterval=50 -p 2112 username@ip address

.                     Step 2:  As a precaution method , take a backup of a particular database. In this case, you can use backup_db command or mysqldump command

                      to  backing up the database.

                                backup_db      <Document Root  Server Folder>

                       Step 3:  Then upload the Image into the server.

        Step 4:   Then you should have obtain database name by referring database.yml  file.

                               <Document Root server folder >/symfony/config/database.yml

        Step 5 :   Afterwards, log    into the mysql and switch into appropriate database.

                                mysql -u root -p   

                                use <database name > ;

.                    Step 6:   Execute the below MySQL command and  take the Type ID 

                                SELECT `nt_id` FROM `ohrm_notifications_type` WHERE `name` = 'Birth Day Wishes';

       Step 7 :   Then execute the below symfony command.  (Note : All the symfony commands should be executed inside the symfony directory)

      sudo php symfony o:BirthdayNotificationImage --imagePath="Image uploaded path" --typeId="10"      --imageName="birthdayWishes"

     Note :  imagePath - Image path needs to be the file path to  image.
                                       Image path could be anywhere in the server with read permissions.  The path should contain the                                        actual name of the file.
                 typeId - Type Id needs to be the "nt_id" on "ohrm_notifications_type" table for "Birth Day Wishes". For fresh installations this will be 10 but for

                               upgrades this will change.

                imageName - Three types of images name mention below.
                                         Wish Image name needs to be "birthdayWishes".
                                          Company logo it needs to be "companyLogo"
                                          Orangehrm Logo it needs to be "ohrmLogo"

      Step 8 : Finally execute the symfony public asset command and cache clear command

                                sudo php symfony orangehrm:publish-assets

                                sudo php symfony cc