-- Table: primitive_definition
CREATE TABLE [primitive_definition] (
    [primitive_definition_id] int NOT NULL,
    [template_definition_id] int NOT NULL,
    [parent_mx_primitive_id] smallint NOT NULL,
    [mx_primitive_id] smallint NOT NULL DEFAULT ((0)),
    [primitive_name] nvarchar(329) NOT NULL DEFAULT (''),
    [execution_group] smallint NOT NULL,
    [is_virtual] bit NOT NULL,
    [primitive_guid] uniqueidentifier NOT NULL,
    [runtime_handler_clsid] uniqueidentifier NULL,
    [package_handler_clsid] uniqueidentifier NULL,
    [supports_dynamic_attributes] bit NOT NULL,
    [major_version] int NOT NULL,
    CONSTRAINT [PK_primitive_definition] PRIMARY KEY ([primitive_definition_id], [template_definition_id])
);
GO

ALTER TABLE [primitive_definition] ADD FOREIGN KEY ([template_definition_id]) REFERENCES [template_definition] ([template_definition_id]);
GO

