Balaji Vajjala's Blog

A DevOps Blog from Trenches

01.06

  • 1.6 Make scripted changes to the database
    • Learning Objectives
    • Database
    • EXERCISE: Make changes to a database script and commit to GitHub.
    • EXERCISE: Make changes to a database script and commit to GitHub (OPTIONAL).

1.6 Make scripted changes to the database

Learning Objectives

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

  • Change an existing database script and commit it to GitHub.

Database

Slide1

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

  1. From the AWSCLI, go to the database directory.
  2. Open the DML file as shown below.

    “` $ sudo vim insert-data.sql

    “`

  3. Make a modification to the contents of the file and save it.

  4. Add the file in Git

    “` $ git add insert-data.sql

    “`

  5. Commit the file to Git

    “` $ git commit -m “Modified database script”

    “`

  6. 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. Open the database file as shown below.

    “` $ sudo vim 20100821203213_create_users.rb

    “`

  3. Make a modification to the contents of the file and save it.

  4. Add the file in Git

    “` $ git add .

    “`

  5. Commit the file to Git

    “` $ git commit -m “Modified database script”

    “`

  6. Push it to the Git master.

    “` $ git push

    “`