Database Schema Change Management with Liquibase Evaluation Form

others

Description

Large Scale Application Deployment

Database Schema Change Management with Liquibase Evaluation Form

 

1.       Create a Table (10 Points)

a.       (Hint - use the Liquibase Quickstart as a guide) Paste the entire Database Change Log required to create a table named “student”, which has these columns:

                                                               i.      Column named “id” of type “int”

                                                             ii.      Column named “name” of type “varchar(50)”

                                                            iii.      Column named “enrolled” of type “boolean"

b.      (Hint – use the Running Liquibase section as a guide) Execute the Database Change Log from 1a, using the Liquibase “update” command, to apply the changes specified to your database.  Capture a screenshot that proves the “student” table was created and that it contains the columns specified.

2.       Alter a Table (15 Points)

a.       Update the Database Change Log created in 1, adding a new change set that adds a new column to the “student” table:

                                                               i.      Column named “grade” of type “<anything that supports decimals>”

Paste the entire Database Change Log (it should now contain 2 change sets)

b.      Execute the Database Change Log from 2a, using Liquibase update, to apply the changes specified to your database.  Capture a screenshot that proves the “student” table was altered and that it contains the (4) expected columns.

c.       Suppose that “grade” is a non-nullable column (i.e. it is required for every row) and that the “student” table already has entries in it when the “grade” column is added.  How can this situation be dealt with using the options available via the Column tag?  In other words, how can the schema constraint be satisfied, even if the solution is to use a temporary placeholder value?

3.       Delete a Column (10 Points)

a.       Update the Database Change Log created in 2, adding a new change set that deletes the “enrolled” column from the “student” table.  Paste the entire Database Change Log (it should now contain 3 change sets).

b.      Execute the Database Change Log from 3a, using Liquibase update, to apply the changes specified to your database.  Capture a screenshot that proves the “student” table was altered and that it once again contains only 3 columns.

4.       Tagging the Database (10 Points)

 

a.       (Hint – Use the tag database feature) Your team is ready to release an application that relies on the “student” table – congratulations!  To prepare for the release, update the Database Change Log created in 3, adding a new change set that tags the database to version “1.0.0-RELEASE”.  Paste the entire Database Change Log (it should now contain 4 change sets).

b.      Capture a screenshot of the database table that was modified when the database tag was applied.  Remember, Liquibase creates its own set of tables to store things like tags.

5.       Create another Table (10 Points)

a.       Working from your previous Database Change Log, add a new change set to create a new table named “instructor”, which has these columns:

                                                               i.      Column named “id” of type “int”

                                                             ii.      Column named “name” of type “varchar(50)”

                                                            iii.      Column named “start_date” of type “<anything that captures a date>"

Paste the entire Database Change Log (it should now contain 5 change sets).

b.      Execute the Database Change Log from 5a, using Liquibase update, to apply the changes specified to your database.  Capture a screenshot that proves the “instructor” table was created and that it contains the columns specified.

6.       Create another Tag (10 Points)

a.       Your team is ready to release the application that relies on the “student” and “instructor” tables – now this is getting easy!  To prepare for the release, update the Database Change Log created in 5, adding a new change set that tags the database to version “1.1.0-RELEASE”.  Paste the entire Database Change Log (it should now contain 6 change sets).

b.      Capture a screenshot of the database table that was modified when the database tag was applied.

7.       Rollback (10 Points)

a.       After releasing version 1.1.0-RELEASE of your application (the version with both “student” and “instructor” tables) to Production, the Operations team finds there’s a problem and the application needs to be reverted to version 1.0.0-RELEASE.  What liquibase command can be used to roll the database schema back to the “1.0.0-RELEASE” tag?

b.      Execute the command and capture a screenshot that shows the “instructor” table no longer exists.

8.       Rollforward (10 Points)

a.       After fixing the (non-database related) application defect described in 7, the Operations team is ready deploy version 1.1.1-RELEASE of the application, which is compatible with version 1.1.0-RELEASE of the database schema.  What liquibase command can be used to roll the database schema forward to the “1.1.0-RELEASE” tag?

b.      Execute the command and capture a screenshot that shows the “instructor” table is back.

Instruction Files

Related Questions in others category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.