Building New Versions of Your Service
In the previous guide you learned how to create entities, add roles, and set permissions for your service.
In this guide we'll take it further by adding another entity, making changes to an existing entity, and learning how to compare changes before building and committing.
Let's get started.
Prerequisites
In order to proceed with this guide, please ensure you have completed at least the following:
- Set up your service with our service creation wizard.
- Add entities, roles, and permissions to your service and make your first build.
Step 1 - Create the Task Entity
Let's add another entity to your service called Task.
- On the Overview page, click Go to Entities, or from the main menu (left sidebar) click the Entities icon.
- Click Add entity.
- In the New Entity dialog, type in Task.
- Click Create Entity.
- The entity comes with a few default fields. We'll add some more fields as follows.
Field Name | Data Type | Properties |
---|---|---|
Title | Single Line Text | Required |
Estimation (days) | Whole Number | |
Start Date | Date Time | |
Status | Option Set | Required, 4 options:
|
Project | Relation to Entity | Related to: Project |
Assigned To | Relation to Entity | Related to: User |
The Task's field list should now look like this:
Refer back to the Set Up Entities, Roles, and Permissions On Your Service guide for specific steps on setting up an entity on your service.
Step 2 - Update the Project Entity
We'll now make a few changes to the Project entity.
- On the Overview page, click Go to Entities, or from the main menu (left sidebar) click the Entities icon.
- Select the Project entity.
- Add a new field called Due Date and set its data type to "Date Time".
- Select the existing Owner field and change its Display Name to "Project Owner".
Step 3 - Compare Pending Changes Before Commit
It's always good to check what was changed before you commit to verify that these changes were intentional. To do so:
- Click Compare Changes. (Note: Compare Changes icon is next to Delete icon)
- The Pending Changes page opens and indicates what was changed and what was added.
- The Task entity was created
- The Project entity was updated
Since these changes were intentional and we're happy to commit them, write a new commit message in the text box at the top of the Pending Changes sidebar.
Click Commit changes and build.
You're Done
Great! You just made some new changes to your service, built it, and Amplication automatically created a new pull request with those changes to GitHub. Great work!