-- Table: visual_element_version
CREATE TABLE [visual_element_version] (
    [gobject_id] int NOT NULL,
    [package_id] int NOT NULL,
    [mx_primitive_id] smallint NOT NULL,
    [visual_element_id] int NOT NULL,
    [inherited_from_gobject_id] int NOT NULL,
    [inherited_from_package_id] int NOT NULL,
    [inherited_from_mx_primitive_id] smallint NOT NULL,
    [inherited_from_visual_element_id] int NULL,
    CONSTRAINT [PK_visual_element_version] PRIMARY KEY ([gobject_id], [package_id], [mx_primitive_id], [inherited_from_gobject_id], [inherited_from_mx_primitive_id], [inherited_from_package_id], [inherited_from_gobject_id], [inherited_from_mx_primitive_id], [inherited_from_package_id], [inherited_from_gobject_id], [inherited_from_mx_primitive_id], [inherited_from_package_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id], [visual_element_id])
);
GO

ALTER TABLE [visual_element_version] ADD FOREIGN KEY ([visual_element_id]) REFERENCES [visual_element] ([visual_element_id]);
GO

