1.6 Make scripted changes to the database

Learning Objectives

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

Database

Slide1

EXERCISE: Make changes to a database script and commit to GitHub.

  1. From the AWSCLI, go to the database directory.
  2. $ cd /home/ec2-user/continuous_integration_example/software/database
    				
  3. Open the DML file as shown below.
    $ sudo vim insert-data.sql
    			
  4. Make a modification to the contents of the file and save it.
  5. Add the file in Git
    $ git add insert-data.sql
    					
  6. Commit the file to Git
    $ git commit -m "Modified database script"
    					
  7. Push it to the Git master.
    $ git push
    					  

EXERCISE: Make changes to a database script and commit to GitHub (OPTIONAL).

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