Table: Project_Template
Columns
Name | Type | Constraints | Description
project_template_KEY | int | NOT NULL | Assigned by COMMON_dp_Allocate_Unique_Identifiers. Database assigned primary key for this table.
update__staff_KEY | int | NOT NULL |
update_date | datetime | NOT NULL |
create_date | datetime | NOT NULL |
project_template_id | nvarchar (11) | NOT NULL | User defined ID (unique).
description | nvarchar (30) | NOT NULL | User defined description.
long_description | nvarchar (-1) | NOT NULL | Long description to use on invoices.
engagement_template_KEY | int | NOT NULL | Key to a Engagement Template that will be used for generated projects.
priority_KEY | int | NOT NULL | Key to a Priority that will be used for generated projects.
tracking_description_KEY | int | NOT NULL | Key to a Tracking Description that will be used for generated projects.
responsible__staff_grouping_type_KEY | int | NOT NULL | Key to a Staff Grouping Type that indicates how to determine which staff will be responsible for generated projects.
responsible__staff_KEY | int |  | Key to a Staff that will be responsible for generated projects.
assigned__staff_grouping_type_KEY | int | NOT NULL | Key to a Staff Grouping Type that indicates how to determine which staff will be assigned to generated projects.
department_KEY | int |  | Key to a Department that will be used for generated projects.
target | nvarchar (1000) | NOT NULL | Target to execute. File name or url.
completion_event | nvarchar (50) | NOT NULL | Description of an event that will mark the generated project as being complete.
budgeted_based_on_tasks | bit | NOT NULL | When set to 1 will indicate that the budget is entirely based off the budget of the Tasks for the generated project.
budgeted_hours | decimal (9, 2) | NOT NULL | Number of hours budgeted to this project (when budgeted_based_on_tasks = 0).
budgeted_amount | decimal (9, 2) | NOT NULL | Amount budgeted to this project (when budgeted_based_on_tasks = 0).
row_version | timestamp | NOT NULL |
department_grouping_type_KEY | int | NOT NULL | Key to a Department Grouping Type that indicates how to determine which department will be assigned to generated projects.
solution_type_name | nvarchar (50) | NOT NULL | Name of the type of solution that is used for Projects generated from this Template. The system has a finite set of solution type names defined.
project_template_id_sortable | varchar (48) | NOT NULL | A representation of the project_template_id column that sorts in natural order, meaning that digits are sorted as numbers while non-digits are sorted alphabetically. A trigger keeps this field synchronized with the content of project_template_id.
staff_assignment_method_KEY | int | NOT NULL |
staff_qualifications__filter_KEY | int |  |
budgeted_amount_is_calculated | bit | NOT NULL |
schedule_item_series_KEY | int | NOT NULL | Key of series that goes with this project template.
extension_event | nvarchar (50) | NOT NULL | Description of a "User" type client status event that will cause this [Project] to be extended.

Primary key
Name | Columns | Description
PK_Project_Template$project_template_KEY | project_template_KEY | CLUSTERED
Unique constraints
Name | Columns | Description
UK_Project_Template__project_template_id | project_template_id | Each id must be unique.
UK_Project_Template__project_template_id_sortable | project_template_id_sortable | An index by the sortable ID is desired, and the algorithm ends up producing unique values.
UK_Project_Template__project_template_KEY__project_template_id__project_template_id_sortable | project_template_KEY, project_template_id, project_template_id_sortable | This is necessary for a foreign key constraint to Project.
UK_Project_Template__schedule_item_series_KEY | schedule_item_series_KEY | Each Project Templste must have its own Series.
Indexes
Name | Columns | Description
IX_Project_Template$assigned__staff_grouping_type_KEY | assigned__staff_grouping_type_KEY | Index supports foreign key FK_Project_Template__Staff_Grouping_Type__assigned__staff_grouping_type_KEY
IX_Project_Template$department_grouping_type_KEY | department_grouping_type_KEY | Index supports foreign key FK_Project_Template__Department_Grouping_Type__department_grouping_type_KEY
IX_Project_Template$department_KEY | department_KEY | Index supports foreign key FK_Project_Template__Department__department_KEY
IX_Project_Template$engagement_template_KEY | engagement_template_KEY | Index supports foreign key FK_Project_Template__Engagement_Template__engagement_template_KEY
IX_Project_Template$priority_KEY | priority_KEY | Index supports foreign key FK_Project_Template__Priority__priority_KEY
IX_Project_Template$responsible__staff_grouping_type_KEY | responsible__staff_grouping_type_KEY | Index supports foreign key FK_Project_Template__Staff_Grouping_Type__responsible__staff_grouping_type_KEY
IX_Project_Template$responsible__staff_KEY | responsible__staff_KEY | Index supports foreign key FK_Project_Template__Staff__responsible__staff_KEY
IX_Project_Template$staff_assignment_method_KEY | staff_assignment_method_KEY | Index supports foreign key FK_Project_Template__Staff_Assignment_Method__staff_assignment_method_KEY
IX_Project_Template$staff_qualifications__filter_KEY | staff_qualifications__filter_KEY | Index supports foreign key FK_Project_Template__Filter__staff_qualifications__filter_KEY
IX_Project_Template$tracking_description_KEY | tracking_description_KEY | Index supports foreign key FK_Project_Template__Tracking_Description__tracking_description_KEY

Foreign keys
Name | Columns | Referenced table | Description
FK_Project_Template__Department__department_KEY | department_KEY | Department |
FK_Project_Template__Department_Grouping_Type__department_grouping_type_KEY | department_grouping_type_KEY | Department_Grouping_Type |
FK_Project_Template__Engagement_Template__engagement_template_KEY | engagement_template_KEY | Engagement_Template |
FK_Project_Template__Filter__staff_qualifications__filter_KEY | staff_qualifications__filter_KEY | Filter |
FK_Project_Template__Priority__priority_KEY | priority_KEY | Priority |
FK_Project_Template__Schedule_Item_Series__schedule_item_series_KEY | schedule_item_series_KEY | Schedule_Item_Series |
FK_Project_Template__Staff__responsible__staff_KEY | responsible__staff_KEY | Staff | on delete set null;
FK_Project_Template__Staff_Assignment_Method__staff_assignment_method_KEY | staff_assignment_method_KEY | Staff_Assignment_Method |
FK_Project_Template__Staff_Grouping_Type__assigned__staff_grouping_type_KEY | assigned__staff_grouping_type_KEY | Staff_Grouping_Type |
FK_Project_Template__Staff_Grouping_Type__responsible__staff_grouping_type_KEY | responsible__staff_grouping_type_KEY | Staff_Grouping_Type |
FK_Project_Template__Tracking_Description__tracking_description_KEY | tracking_description_KEY | Tracking_Description |

Incoming foreign keys
Name | Columns | Referencing table | Description
FK_Project_Template_Assignment__Project_Template__project_template_KEY | project_template_KEY | Project_Template_Assignment |
FK_Project_Template_Entity__Project_Template__project_template_KEY | project_template_KEY | Project_Template_Entity |
FK_Project_Template_Extension__Project_Template__project_template_KEY | project_template_KEY | Project_Template_Extension |
FK_Task_Template__Project_Template__project_template_KEY | project_template_KEY | Task_Template |
FK_Project__Project_Template__project_template_KEY | project_template_KEY | Project |
FK_Project__Project_Template__project_template_KEY__project_template_id__project_template_id_sortable | project_template_KEY, project_template_id, project_template_id_sortable | Project | on update cascade;