04.05
- 4.5 Script a database
- Learning Objectives
- EXERCISE: Run scripted database files
- EXERCISE: Scripted Database (OPTIONAL)
- Scripted Databases
4.5 Script a database
Learning Objectives
By the end of this lesson you will be able to:
- Run database script as part of delivery pipeline.
EXERCISE: Run scripted database files
- 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
- Add a new table called country to the create-database-mysql.sql file.
Run a private build and verify that the country table was added in MySQL
“` cd /home/ec2-user/continuous_integration_example/software/ ant mysql -h localhost -u root -p use brewery; show tables;
“`
Add, commit and push your changes to Git master.
EXERCISE: Scripted Database (OPTIONAL)
- 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
- 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