1.4 Make scripted changes to the database

Learning Objectives

By the end of this lesson you will be able to:

Database

Slide1

Make changes to a database script and commit to GitHub.

  1. From the root directory of your EC2 instance change directory to sample_app.
  2. $ cd /home/ec2-user/sample_app/db/migrate
    			
  3. Open the test file as shown below.
    $ sudo vim 20100821203213_create_users.rb 
    		
  4. Make a modification to the contents of the file and save it.
  5. From the root directory of your EC2 instance change directory to sample_app.
  6. $ cd /home/ec2-user/sample_app/	
    					
  7. Add the file in Git
    $ git add .
    				
  8. Commit the file to Git
    $ git commit -m "Modified database script"
    				
  9. Push it to the Git master.
    $ git push