8.1 Script a database

Learning Objectives

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

Scripted Databases

Slide1

Scripted Database

  1. Open database schema file from the AWSCLI instance. You can also find the file by visiting https://github.com/stelligent/sample_app/tree/master/db
  2. $ cd /home/ec2-user/sample_app/db
    					
    $ sudo vim schema.rb
    					
  3. Open database migration file from the AWSCLI instance. You can also find the file by visiting https://github.com/stelligent/sample_app/tree/master/db/migrate
  4. $ cd /home/ec2-user/sample_app/db/migrate
    				
    $ sudo vim 20100821203213_create_users.rb
    				
  5. Open database configuration file from the AWSCLI instance. You can also find the file by visiting https://github.com/stelligent/sample_app/blob/master/config/database.yml
  6. $ cd /home/ec2-user/sample_app/config/
    				
    $ sudo vim database.yml