Implement LmxOpcUa server — all 6 phases complete

Full OPC UA server on .NET Framework 4.8 (x86) exposing AVEVA System
Platform Galaxy tags via MXAccess. Mirrors Galaxy object hierarchy as
OPC UA address space, translating contained-name browse paths to
tag-name runtime references.

Components implemented:
- Configuration: AppConfiguration with 4 sections, validator
- Domain: ConnectionState, Quality, Vtq, MxDataTypeMapper, error codes
- MxAccess: StaComThread, MxAccessClient (partial classes), MxProxyAdapter
  using strongly-typed ArchestrA.MxAccess COM interop
- Galaxy Repository: SQL queries (hierarchy, attributes, change detection),
  ChangeDetectionService with auto-rebuild on deploy
- OPC UA Server: LmxNodeManager (CustomNodeManager2), LmxOpcUaServer,
  OpcUaServerHost with programmatic config, SecurityPolicy None
- Status Dashboard: HTTP server with HTML/JSON/health endpoints
- Integration: Full 14-step startup, graceful shutdown, component wiring

175 tests (174 unit + 1 integration), all passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-03-25 05:55:27 -04:00
commit a7576ffb38
283 changed files with 16493 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
-- Table: ConversionQueue
CREATE TABLE [ConversionQueue] (
[id] int NULL,
[Name] nvarchar(329) NULL,
[IsCheckedOut] bit NOT NULL,
[Status] bit NOT NULL DEFAULT ((0)),
[MetaData] nchar(256) NULL,
[OperationType] nchar(20) NOT NULL,
[timestamp_of_last_change] bigint NULL,
[change_type] int NULL
);
GO

View File

@@ -0,0 +1,9 @@
-- Table: CurrentSessionContainedName
CREATE TABLE [CurrentSessionContainedName] (
[Uniqeid] int NOT NULL,
[obj_id] int NULL,
[containedname] nvarchar(32) NULL,
CONSTRAINT [PK_CurrentSessionContainedName] PRIMARY KEY ([Uniqeid])
);
GO

View File

@@ -0,0 +1,7 @@
-- Table: ImportTransaction
CREATE TABLE [ImportTransaction] (
[ImportOperationId] nvarchar(329) NULL,
[Status] bit NOT NULL DEFAULT ((1))
);
GO

View File

@@ -0,0 +1,8 @@
-- Table: aa_sql_objects
CREATE TABLE [aa_sql_objects] (
[object_name] nvarchar(128) NOT NULL,
[object_type] nvarchar(10) NOT NULL,
CONSTRAINT [PK_aa_sql_objects] PRIMARY KEY ([object_name])
);
GO

View File

@@ -0,0 +1,9 @@
-- Table: affected_overview_symbols
CREATE TABLE [affected_overview_symbols] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[mx_primitive_id] smallint NOT NULL,
[visual_element_id] int NOT NULL
);
GO

View File

@@ -0,0 +1,8 @@
-- Table: alarm_message_defaults
CREATE TABLE [alarm_message_defaults] (
[phrase_id] int NOT NULL,
[default_message] nvarchar(1024) NOT NULL,
CONSTRAINT [PK_alarm_message_defaults] PRIMARY KEY ([phrase_id])
);
GO

View File

@@ -0,0 +1,8 @@
-- Table: alarm_message_timestamps
CREATE TABLE [alarm_message_timestamps] (
[gobject_id] int NOT NULL,
[timestamp_of_populate] bigint NOT NULL DEFAULT ((0)),
CONSTRAINT [PK_alarm_message_timestamps] PRIMARY KEY ([gobject_id])
);
GO

View File

@@ -0,0 +1,12 @@
-- Table: alarm_message_translations
CREATE TABLE [alarm_message_translations] (
[phrase_id] int NOT NULL,
[locale_id] smallint NOT NULL,
[translated_message] nvarchar(1024) NOT NULL,
CONSTRAINT [PK_alarm_message_translations] PRIMARY KEY ([phrase_id], [locale_id], [phrase_id], [locale_id])
);
GO
ALTER TABLE [alarm_message_translations] ADD FOREIGN KEY ([locale_id]) REFERENCES [supported_locales] ([locale_id]);
GO

View File

@@ -0,0 +1,13 @@
-- Table: alarm_messages
CREATE TABLE [alarm_messages] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[mx_primitive_id] smallint NOT NULL,
[phrase_id] int NOT NULL,
CONSTRAINT [PK_alarm_messages] PRIMARY KEY ([gobject_id], [package_id], [mx_primitive_id], [phrase_id], [gobject_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id])
);
GO
ALTER TABLE [alarm_messages] ADD FOREIGN KEY ([package_id]) REFERENCES [primitive_instance] ([package_id]);
GO

View File

@@ -0,0 +1,24 @@
-- Table: attribute_definition
CREATE TABLE [attribute_definition] (
[attribute_definition_id] int NOT NULL,
[primitive_definition_id] int NOT NULL,
[attribute_name] nvarchar(329) NOT NULL,
[mx_attribute_id] smallint NOT NULL,
[has_config_set_handler] bit NOT NULL,
[mx_data_type] smallint NOT NULL,
[is_array] bit NOT NULL,
[security_classification] smallint NOT NULL,
[security_classification_needs_deployed] bit NOT NULL,
[mx_attribute_category] int NOT NULL,
[is_frequently_accessed] bit NOT NULL,
[is_locked] bit NOT NULL,
[is_locked_needs_deployed] bit NOT NULL,
[mx_value] text(2147483647) NOT NULL,
[mx_value_needs_deployed] bit NOT NULL,
CONSTRAINT [PK_attribute_definition] PRIMARY KEY ([primitive_definition_id], [mx_attribute_id], [primitive_definition_id])
);
GO
ALTER TABLE [attribute_definition] ADD FOREIGN KEY ([primitive_definition_id]) REFERENCES [primitive_definition] ([primitive_definition_id]);
GO

View File

@@ -0,0 +1,26 @@
-- Table: attribute_reference
CREATE TABLE [attribute_reference] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[referring_mx_primitive_id] smallint NOT NULL DEFAULT ((0)),
[referring_mx_attribute_id] smallint NOT NULL DEFAULT ((0)),
[element_index] smallint NOT NULL DEFAULT ((0)),
[resolved_gobject_id] int NOT NULL DEFAULT ((0)),
[reference_string] nvarchar(700) NOT NULL DEFAULT (''),
[context_string] nvarchar(329) NOT NULL DEFAULT (''),
[object_signature] int NOT NULL DEFAULT ((0)),
[resolved_mx_primitive_id] smallint NOT NULL DEFAULT ((0)),
[resolved_mx_attribute_id] smallint NOT NULL DEFAULT ((0)),
[resolved_mx_property_id] smallint NOT NULL DEFAULT ((0)),
[attribute_signature] int NOT NULL DEFAULT ((0)),
[lock_type] int NOT NULL DEFAULT ((0)),
[is_valid] bit NOT NULL DEFAULT ((0)),
[attr_res_status] int NOT NULL DEFAULT ((0)),
[attribute_index] smallint NULL DEFAULT ((-1)),
CONSTRAINT [PK_attribute_reference] PRIMARY KEY ([gobject_id], [package_id], [referring_mx_primitive_id], [referring_mx_attribute_id], [element_index], [gobject_id], [package_id], [referring_mx_primitive_id], [gobject_id], [package_id], [referring_mx_primitive_id], [gobject_id], [package_id], [referring_mx_primitive_id])
);
GO
ALTER TABLE [attribute_reference] ADD FOREIGN KEY ([referring_mx_primitive_id]) REFERENCES [primitive_instance] ([package_id]);
GO

View File

@@ -0,0 +1,11 @@
-- Table: attributes_translation_table
CREATE TABLE [attributes_translation_table] (
[gobject_id] int NULL,
[attribute_name] nvarchar(329) NOT NULL,
[new_primitive_id] int NULL,
[new_attribute_id] int NULL,
[old_primitive_id] int NULL,
[old_attribute_id] int NULL
);
GO

View File

@@ -0,0 +1,11 @@
-- Table: autobind_device
CREATE TABLE [autobind_device] (
[dio_id] int NOT NULL,
[overridden_naming_rule_id] int NULL,
CONSTRAINT [PK_autobind_device] PRIMARY KEY ([dio_id], [overridden_naming_rule_id], [dio_id])
);
GO
ALTER TABLE [autobind_device] ADD FOREIGN KEY ([dio_id]) REFERENCES [gobject] ([gobject_id]);
GO

View File

@@ -0,0 +1,11 @@
-- Table: autobind_device_category
CREATE TABLE [autobind_device_category] (
[category_id] smallint NOT NULL,
[rule_id] int NULL DEFAULT ((0)),
CONSTRAINT [PK_autobind_device_category] PRIMARY KEY ([category_id], [rule_id], [category_id])
);
GO
ALTER TABLE [autobind_device_category] ADD FOREIGN KEY ([category_id]) REFERENCES [lookup_category] ([category_id]);
GO

View File

@@ -0,0 +1,11 @@
-- Table: autobind_device_template
CREATE TABLE [autobind_device_template] (
[template_definition_id] int NOT NULL,
[rule_id] int NULL,
CONSTRAINT [PK_autobind_device_template] PRIMARY KEY ([template_definition_id], [rule_id], [template_definition_id])
);
GO
ALTER TABLE [autobind_device_template] ADD FOREIGN KEY ([template_definition_id]) REFERENCES [template_definition] ([template_definition_id]);
GO

View File

@@ -0,0 +1,13 @@
-- Table: autobind_device_topic
CREATE TABLE [autobind_device_topic] (
[dio_id] int NOT NULL,
[sg_mx_primitive_id] smallint NOT NULL DEFAULT ((0)),
[overridden_naming_rule_id] int NULL,
[default_xlate_rule_id] int NOT NULL DEFAULT ((0)),
CONSTRAINT [PK_autobind_device_topic] PRIMARY KEY ([dio_id], [sg_mx_primitive_id], [overridden_naming_rule_id], [dio_id])
);
GO
ALTER TABLE [autobind_device_topic] ADD FOREIGN KEY ([dio_id]) REFERENCES [autobind_device] ([dio_id]);
GO

View File

@@ -0,0 +1,8 @@
-- Table: autobind_naming_rule
CREATE TABLE [autobind_naming_rule] (
[rule_id] int NOT NULL,
[rule_name] nvarchar(329) NOT NULL,
CONSTRAINT [PK_autobind_naming_rule] PRIMARY KEY ([rule_id])
);
GO

View File

@@ -0,0 +1,12 @@
-- Table: autobind_naming_rule_spec
CREATE TABLE [autobind_naming_rule_spec] (
[rule_id] int NOT NULL,
[io_type] nchar(1) NOT NULL,
[rule_spec] nvarchar(512) NOT NULL,
CONSTRAINT [PK_autobind_naming_rule_spec] PRIMARY KEY ([rule_id], [io_type], [rule_id])
);
GO
ALTER TABLE [autobind_naming_rule_spec] ADD FOREIGN KEY ([rule_id]) REFERENCES [autobind_naming_rule] ([rule_id]);
GO

View File

@@ -0,0 +1,10 @@
-- Table: autobind_translation_rule
CREATE TABLE [autobind_translation_rule] (
[xlate_rule_id] int NOT NULL,
[xlate_rule_name] nvarchar(329) NOT NULL,
[xlate_rule_gsub_str] nvarchar(1000) NULL,
[xlate_rule_scope_global] bit NOT NULL DEFAULT ((0)),
CONSTRAINT [PK_autobind_translation_rule] PRIMARY KEY ([xlate_rule_id])
);
GO

View File

@@ -0,0 +1,17 @@
-- Table: autobound_attribute
CREATE TABLE [autobound_attribute] (
[dio_id] int NOT NULL,
[sg_mx_primitive_id] smallint NOT NULL DEFAULT ((0)),
[gobject_id] int NOT NULL,
[mx_primitive_id] smallint NOT NULL,
[mx_attribute_id] smallint NOT NULL,
[element_index] smallint NOT NULL DEFAULT ((0)),
[attr_alias] nvarchar(329) NULL,
[xlate_rule_id] int NOT NULL DEFAULT ((0)),
CONSTRAINT [PK_autobound_attribute] PRIMARY KEY ([gobject_id], [mx_primitive_id], [mx_attribute_id], [element_index], [dio_id], [sg_mx_primitive_id], [dio_id], [sg_mx_primitive_id], [xlate_rule_id])
);
GO
ALTER TABLE [autobound_attribute] ADD FOREIGN KEY ([xlate_rule_id]) REFERENCES [autobind_translation_rule] ([xlate_rule_id]);
GO

View File

@@ -0,0 +1,9 @@
-- Table: client_control_class_link
CREATE TABLE [client_control_class_link] (
[gobject_id] int NOT NULL,
[file_id] int NULL,
[class_name] nvarchar(1024) NOT NULL,
CONSTRAINT [PK_client_control_class_link] PRIMARY KEY ([gobject_id])
);
GO

View File

@@ -0,0 +1,11 @@
-- Table: client_info
CREATE TABLE [client_info] (
[id] int NOT NULL,
[client_unique_identifier] nvarchar(4000) NOT NULL,
[client_name] nvarchar(64) NOT NULL,
[deployed_files_count] smallint NOT NULL,
[time_of_last_deployed_object_components] datetime NULL DEFAULT (getdate()),
[timestamp_of_last_synchronized] bigint NOT NULL DEFAULT ((0))
);
GO

View File

@@ -0,0 +1,16 @@
-- Table: control_index
CREATE TABLE [control_index] (
[entity_id] int NOT NULL,
[gobject_id] int NOT NULL,
[control_id] nvarchar(329) NULL,
[control_name] nvarchar(329) NOT NULL,
[control_description] nvarchar(2000) NULL,
[properties] nvarchar(-1) NULL,
[thumbnail] nvarchar(-1) NULL,
CONSTRAINT [PK_control_index] PRIMARY KEY ([gobject_id], [control_name], [gobject_id])
);
GO
ALTER TABLE [control_index] ADD FOREIGN KEY ([gobject_id]) REFERENCES [gobject] ([gobject_id]);
GO

View File

@@ -0,0 +1,9 @@
-- Table: data_type
CREATE TABLE [data_type] (
[mx_data_type] tinyint NOT NULL,
[description] varchar(30) NOT NULL,
[ow_data_type] varchar(10) NULL,
CONSTRAINT [PK_data_type] PRIMARY KEY ([mx_data_type])
);
GO

View File

@@ -0,0 +1,8 @@
-- Table: deleted_gobject
CREATE TABLE [deleted_gobject] (
[gobject_id] int NOT NULL DEFAULT ((0)),
[timestamp_of_delete] timestamp NOT NULL,
CONSTRAINT [PK_deleted_gobject] PRIMARY KEY ([timestamp_of_delete])
);
GO

View File

@@ -0,0 +1,9 @@
-- Table: deleted_ids
CREATE TABLE [deleted_ids] (
[table_id] smallint NULL,
[deleted_id] int NOT NULL,
[deletion_timestamp] timestamp NOT NULL,
[deletion_time] datetime NULL
);
GO

View File

@@ -0,0 +1,8 @@
-- Table: deleted_visual_element
CREATE TABLE [deleted_visual_element] (
[visual_element_name] nvarchar(329) NULL,
[visual_element_type] nvarchar(32) NULL,
[timestamp_of_delete] timestamp NOT NULL
);
GO

View File

@@ -0,0 +1,13 @@
-- Table: deleted_visual_element_version
CREATE TABLE [deleted_visual_element_version] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[mx_primitive_id] smallint NOT NULL,
[visual_element_name] nvarchar(329) NOT NULL,
[visual_element_type] nvarchar(32) NOT NULL,
[timestamp_of_delete] timestamp NOT NULL,
[visual_element_id] int NOT NULL,
CONSTRAINT [PK_deleted_visual_element_version] PRIMARY KEY ([gobject_id], [package_id], [timestamp_of_delete])
);
GO

View File

@@ -0,0 +1,19 @@
-- Table: deployed_file
CREATE TABLE [deployed_file] (
[deployed_file_id] int NOT NULL,
[file_id] int NOT NULL,
[node_name] nvarchar(256) NOT NULL,
[need_to_delete] int NOT NULL DEFAULT ((0)),
[is_package_deployed] bit NOT NULL,
[is_editor_deployed] bit NOT NULL,
[is_runtime_deployed] bit NOT NULL,
[is_browser_deployed] bit NOT NULL,
[file_version] nvarchar(50) NOT NULL DEFAULT (''),
[file_modified_time] nvarchar(50) NOT NULL DEFAULT (''),
CONSTRAINT [PK_deployed_file] PRIMARY KEY ([deployed_file_id], [file_id])
);
GO
ALTER TABLE [deployed_file] ADD FOREIGN KEY ([file_id]) REFERENCES [file_table] ([file_id]);
GO

View File

@@ -0,0 +1,8 @@
-- Table: deployed_intouch_viewapp
CREATE TABLE [deployed_intouch_viewapp] (
[timestamp_of_deploy] bigint NOT NULL DEFAULT ((1)),
[gobject_id] int NOT NULL,
[deploy_file_transfering] bit NULL DEFAULT ((0))
);
GO

View File

@@ -0,0 +1,7 @@
-- Table: deployed_intouch_viewapp_visual_element_dependency
CREATE TABLE [deployed_intouch_viewapp_visual_element_dependency] (
[gobject_id] int NULL,
[visual_element_name] nvarchar(2000) NULL
);
GO

View File

@@ -0,0 +1,25 @@
-- Table: dynamic_attribute
CREATE TABLE [dynamic_attribute] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[mx_primitive_id] smallint NOT NULL,
[mx_attribute_id] smallint NOT NULL,
[attribute_name] nvarchar(329) NOT NULL,
[mx_data_type] smallint NOT NULL,
[is_array] bit NOT NULL,
[security_classification] smallint NOT NULL,
[mx_attribute_category] int NOT NULL,
[lock_type] int NOT NULL,
[mx_value] text(2147483647) NOT NULL,
[owned_by_gobject_id] int NOT NULL DEFAULT ((0)),
[original_lock_type] int NOT NULL DEFAULT ((0)),
[dynamic_attribute_type] smallint NOT NULL DEFAULT ((0)),
[bitvalues] smallint NOT NULL DEFAULT ((0)),
[dynamic_attribute_id] bigint NOT NULL,
CONSTRAINT [PK_dynamic_attribute] PRIMARY KEY ([gobject_id], [package_id], [mx_primitive_id], [mx_attribute_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id])
);
GO
ALTER TABLE [dynamic_attribute] ADD FOREIGN KEY ([package_id]) REFERENCES [primitive_instance] ([package_id]);
GO

View File

@@ -0,0 +1,12 @@
-- Table: external_content_media_types
CREATE TABLE [external_content_media_types] (
[entity_id] int NOT NULL,
[media_type] nvarchar(255) NOT NULL,
[control_entity_id] int NOT NULL,
[uri_property_name] nvarchar(1023) NULL,
[media_type_property_name] nvarchar(1023) NULL,
[is_default] bit NULL,
CONSTRAINT [PK_external_content_media_types] PRIMARY KEY ([entity_id])
);
GO

View File

@@ -0,0 +1,9 @@
-- Table: feature
CREATE TABLE [feature] (
[feature_id] int NOT NULL,
[feature_name] nvarchar(256) NOT NULL,
[feature_type] nvarchar(256) NOT NULL,
CONSTRAINT [PK_feature] PRIMARY KEY ([feature_id])
);
GO

View File

@@ -0,0 +1,11 @@
-- Table: feature_file_link
CREATE TABLE [feature_file_link] (
[feature_id] int NOT NULL,
[file_id] int NOT NULL,
CONSTRAINT [PK_feature_file_link] PRIMARY KEY ([feature_id], [file_id], [feature_id], [file_id])
);
GO
ALTER TABLE [feature_file_link] ADD FOREIGN KEY ([file_id]) REFERENCES [file_table] ([file_id]);
GO

View File

@@ -0,0 +1,13 @@
-- Table: file_browserinfo_link
CREATE TABLE [file_browserinfo_link] (
[primitive_definition_id] int NOT NULL,
[file_id] int NOT NULL,
[assembly_strong_name] nvarchar(512) NOT NULL,
[assembly_type_name] nvarchar(256) NOT NULL,
CONSTRAINT [PK_file_browserinfo_link] PRIMARY KEY ([primitive_definition_id], [file_id], [file_id], [primitive_definition_id])
);
GO
ALTER TABLE [file_browserinfo_link] ADD FOREIGN KEY ([primitive_definition_id]) REFERENCES [primitive_definition] ([primitive_definition_id]);
GO

View File

@@ -0,0 +1,11 @@
-- Table: file_pending_update
CREATE TABLE [file_pending_update] (
[file_id] int NOT NULL,
[node_name] nvarchar(256) NOT NULL,
CONSTRAINT [PK_file_pending_update] PRIMARY KEY ([file_id])
);
GO
ALTER TABLE [file_pending_update] ADD FOREIGN KEY ([file_id]) REFERENCES [file_table] ([file_id]);
GO

View File

@@ -0,0 +1,15 @@
-- Table: file_primitive_definition_link
CREATE TABLE [file_primitive_definition_link] (
[primitive_definition_id] int NOT NULL,
[file_id] int NOT NULL,
[is_needed_for_package] bit NOT NULL DEFAULT ((0)),
[is_needed_for_runtime] bit NOT NULL DEFAULT ((0)),
[is_needed_for_editor] bit NOT NULL DEFAULT ((0)),
[is_needed_for_browser] bit NOT NULL DEFAULT ((0)),
CONSTRAINT [PK_file_primitive_definition_link] PRIMARY KEY ([primitive_definition_id], [file_id], [file_id], [primitive_definition_id])
);
GO
ALTER TABLE [file_primitive_definition_link] ADD FOREIGN KEY ([primitive_definition_id]) REFERENCES [primitive_definition] ([primitive_definition_id]);
GO

View File

@@ -0,0 +1,13 @@
-- Table: file_table
CREATE TABLE [file_table] (
[file_id] int NOT NULL,
[file_name] nvarchar(256) NOT NULL,
[vendor_name] nvarchar(256) NOT NULL,
[registration_type] int NOT NULL,
[subfolder] nvarchar(256) NOT NULL DEFAULT (''),
[file_version] nvarchar(50) NOT NULL DEFAULT (''),
[file_modified_time] nvarchar(50) NOT NULL DEFAULT (''),
CONSTRAINT [PK_file_table] PRIMARY KEY ([file_id])
);
GO

14
gr/ddl/tables/folder.sql Normal file
View File

@@ -0,0 +1,14 @@
-- Table: folder
CREATE TABLE [folder] (
[folder_id] int NOT NULL,
[folder_type] smallint NOT NULL,
[folder_name] nvarchar(64) NOT NULL,
[parent_folder_id] int NOT NULL,
[depth] int NOT NULL,
[has_objects] bit NOT NULL,
[has_folders] bit NOT NULL,
[timestamp_of_last_change] timestamp NOT NULL,
CONSTRAINT [PK_folder] PRIMARY KEY ([folder_id])
);
GO

View File

@@ -0,0 +1,13 @@
-- Table: folder_gobject_link
CREATE TABLE [folder_gobject_link] (
[folder_id] int NOT NULL,
[folder_type] smallint NOT NULL,
[gobject_id] int NOT NULL,
[timestamp_of_last_change] timestamp NOT NULL,
CONSTRAINT [PK_folder_gobject_link] PRIMARY KEY ([folder_id], [gobject_id], [gobject_id])
);
GO
ALTER TABLE [folder_gobject_link] ADD FOREIGN KEY ([gobject_id]) REFERENCES [gobject] ([gobject_id]);
GO

18
gr/ddl/tables/galaxy.sql Normal file
View File

@@ -0,0 +1,18 @@
-- Table: galaxy
CREATE TABLE [galaxy] (
[time_of_last_deploy] datetime NULL DEFAULT (getdate()),
[time_of_last_config_change] datetime NULL DEFAULT (getdate()),
[is_galaxy_installed] bit NOT NULL DEFAULT ((1)),
[time_of_last_reference_binding] datetime NULL DEFAULT (getdate()),
[timestamp_of_last_cascade] bigint NOT NULL DEFAULT ((1)),
[timestamp_of_last_visual_element_reference_bind] bigint NOT NULL DEFAULT ((0)),
[max_proxy_timestamp] bigint NOT NULL DEFAULT (CONVERT([bigint],@@dbts)),
[max_visual_element_timestamp] bigint NOT NULL DEFAULT (CONVERT([bigint],@@dbts)),
[is_migration_in_progress] bit NOT NULL DEFAULT ((0)),
[time_of_last_association_change] datetime NULL DEFAULT (getdate()),
[subscription_id] uniqueidentifier NULL,
[batch_id] uniqueidentifier NULL,
[iteration_id] int NOT NULL DEFAULT ((0))
);
GO

View File

@@ -0,0 +1,7 @@
-- Table: galaxy_data
CREATE TABLE [galaxy_data] (
[data_type] nvarchar(256) NOT NULL,
[data] image(2147483647) NULL
);
GO

View File

@@ -0,0 +1,8 @@
-- Table: galaxy_settings
CREATE TABLE [galaxy_settings] (
[galaxyid] int NULL,
[default_qs_data] ntext(1073741823) NOT NULL,
[current_qs_data] ntext(1073741823) NOT NULL
);
GO

35
gr/ddl/tables/gobject.sql Normal file
View File

@@ -0,0 +1,35 @@
-- Table: gobject
CREATE TABLE [gobject] (
[gobject_id] int NOT NULL,
[template_definition_id] int NOT NULL,
[derived_from_gobject_id] int NOT NULL DEFAULT ((0)),
[contained_by_gobject_id] int NOT NULL DEFAULT ((0)),
[area_gobject_id] int NOT NULL DEFAULT ((0)),
[hosted_by_gobject_id] int NOT NULL DEFAULT ((0)),
[checked_out_by_user_guid] uniqueidentifier NULL,
[default_symbol_gobject_id] int NOT NULL DEFAULT ((0)),
[default_display_gobject_id] int NOT NULL DEFAULT ((0)),
[checked_in_package_id] int NOT NULL DEFAULT ((0)),
[checked_out_package_id] int NOT NULL DEFAULT ((0)),
[deployed_package_id] int NOT NULL DEFAULT ((0)),
[last_deployed_package_id] int NOT NULL DEFAULT ((0)),
[tag_name] nvarchar(329) NOT NULL,
[contained_name] nvarchar(32) NOT NULL DEFAULT (''),
[identity_guid] uniqueidentifier NOT NULL DEFAULT (newid()),
[configuration_guid] uniqueidentifier NOT NULL,
[configuration_version] int NOT NULL,
[deployed_version] int NOT NULL DEFAULT ((0)),
[is_template] bit NOT NULL DEFAULT ((0)),
[is_hidden] bit NOT NULL DEFAULT ((0)),
[software_upgrade_needed] bit NOT NULL DEFAULT ((0)),
[hosting_tree_level] smallint NOT NULL DEFAULT ((0)),
[hierarchical_name] nvarchar(329) NOT NULL DEFAULT (''),
[namespace_id] smallint NOT NULL DEFAULT ((1)),
[deployment_pending_status] bit NOT NULL DEFAULT ((0)),
CONSTRAINT [PK_gobject] PRIMARY KEY ([gobject_id], [namespace_id], [template_definition_id])
);
GO
ALTER TABLE [gobject] ADD FOREIGN KEY ([template_definition_id]) REFERENCES [template_definition] ([template_definition_id]);
GO

View File

@@ -0,0 +1,11 @@
-- Table: gobject_asset_order
CREATE TABLE [gobject_asset_order] (
[gobject_id] int NOT NULL,
[relative_index] float(53,) NOT NULL,
CONSTRAINT [PK_gobject_asset_order] PRIMARY KEY ([gobject_id])
);
GO
ALTER TABLE [gobject_asset_order] ADD FOREIGN KEY ([gobject_id]) REFERENCES [gobject] ([gobject_id]);
GO

View File

@@ -0,0 +1,16 @@
-- Table: gobject_change_log
CREATE TABLE [gobject_change_log] (
[gobject_change_log_id] int NOT NULL,
[gobject_id] int NOT NULL,
[change_date] datetime NULL,
[operation_id] smallint NOT NULL,
[user_comment] nvarchar(1024) NOT NULL DEFAULT (''),
[configuration_version] int NOT NULL DEFAULT ((0)),
[user_profile_name] nvarchar(256) NOT NULL,
CONSTRAINT [PK_gobject_change_log] PRIMARY KEY ([gobject_id], [operation_id])
);
GO
ALTER TABLE [gobject_change_log] ADD FOREIGN KEY ([operation_id]) REFERENCES [lookup_operation] ([operation_id]);
GO

View File

@@ -0,0 +1,11 @@
-- Table: gobject_filter_info_timestamp
CREATE TABLE [gobject_filter_info_timestamp] (
[gobject_id] int NULL,
[timestamp_of_last_change] timestamp NOT NULL,
CONSTRAINT [PK_gobject_filter_info_timestamp] PRIMARY KEY ([timestamp_of_last_change], [gobject_id])
);
GO
ALTER TABLE [gobject_filter_info_timestamp] ADD FOREIGN KEY ([gobject_id]) REFERENCES [gobject] ([gobject_id]);
GO

View File

@@ -0,0 +1,11 @@
-- Table: gobject_friendly_name
CREATE TABLE [gobject_friendly_name] (
[gobject_id] int NOT NULL,
[friendly_name] nvarchar(1024) NOT NULL DEFAULT (''),
CONSTRAINT [PK_gobject_friendly_name] PRIMARY KEY ([gobject_id])
);
GO
ALTER TABLE [gobject_friendly_name] ADD FOREIGN KEY ([gobject_id]) REFERENCES [gobject] ([gobject_id]);
GO

View File

@@ -0,0 +1,7 @@
-- Table: gobject_log_details
CREATE TABLE [gobject_log_details] (
[gobject_id] int NOT NULL,
[tag_name] nvarchar(329) NOT NULL
);
GO

View File

@@ -0,0 +1,6 @@
-- Table: gobject_protected
CREATE TABLE [gobject_protected] (
[gobject_id] int NOT NULL
);
GO

View File

@@ -0,0 +1,13 @@
-- Table: instance
CREATE TABLE [instance] (
[gobject_id] int NOT NULL,
[mx_platform_id] smallint NOT NULL DEFAULT ((0)),
[mx_engine_id] smallint NOT NULL DEFAULT ((0)),
[mx_object_id] smallint NOT NULL DEFAULT ((0)),
CONSTRAINT [PK_instance] PRIMARY KEY ([gobject_id], [gobject_id])
);
GO
ALTER TABLE [instance] ADD FOREIGN KEY ([gobject_id]) REFERENCES [gobject] ([gobject_id]);
GO

View File

@@ -0,0 +1,6 @@
-- Table: intouchviewapptemplate_allsymbols
CREATE TABLE [intouchviewapptemplate_allsymbols] (
[gobject_id] int NOT NULL
);
GO

View File

@@ -0,0 +1,8 @@
-- Table: lookup_category
CREATE TABLE [lookup_category] (
[category_id] smallint NOT NULL,
[category_name] nvarchar(50) NOT NULL,
CONSTRAINT [PK_lookup_category] PRIMARY KEY ([category_id])
);
GO

View File

@@ -0,0 +1,7 @@
-- Table: lookup_folder
CREATE TABLE [lookup_folder] (
[folder_type] smallint NOT NULL,
[folder_type_name] nvarchar(32) NULL
);
GO

View File

@@ -0,0 +1,9 @@
-- Table: lookup_operation
CREATE TABLE [lookup_operation] (
[operation_id] smallint NOT NULL,
[operation_code] nvarchar(50) NOT NULL,
[operation_name] nvarchar(256) NOT NULL,
CONSTRAINT [PK_lookup_operation] PRIMARY KEY ([operation_id])
);
GO

View File

@@ -0,0 +1,8 @@
-- Table: lookup_package_op_status
CREATE TABLE [lookup_package_op_status] (
[status_id] int NOT NULL,
[status_name] nvarchar(50) NOT NULL,
CONSTRAINT [PK_lookup_package_op_status] PRIMARY KEY ([status_id])
);
GO

View File

@@ -0,0 +1,8 @@
-- Table: lookup_status
CREATE TABLE [lookup_status] (
[status_id] int NOT NULL,
[status_name] nvarchar(50) NOT NULL,
CONSTRAINT [PK_lookup_status] PRIMARY KEY ([status_id])
);
GO

View File

@@ -0,0 +1,7 @@
-- Table: lookup_table_name
CREATE TABLE [lookup_table_name] (
[table_id] smallint NOT NULL,
[table_name] nvarchar(250) NULL
);
GO

View File

@@ -0,0 +1,8 @@
-- Table: namespace
CREATE TABLE [namespace] (
[namespace_id] smallint NOT NULL,
[namespace_name] nvarchar(32) NULL,
CONSTRAINT [PK_namespace] PRIMARY KEY ([namespace_id])
);
GO

View File

@@ -0,0 +1,9 @@
-- Table: object_device_linkage
CREATE TABLE [object_device_linkage] (
[gobject_id] int NOT NULL,
[dio_id] int NOT NULL,
[sg_mx_primitive_id] smallint NOT NULL,
CONSTRAINT [PK_object_device_linkage] PRIMARY KEY ([gobject_id])
);
GO

View File

@@ -0,0 +1,9 @@
-- Table: object_wizard_overview_symbols
CREATE TABLE [object_wizard_overview_symbols] (
[gobject_id] int NOT NULL,
[visual_element_id] int NOT NULL,
[change_type] int NOT NULL,
[mx_primitive_id] int NULL
);
GO

View File

@@ -0,0 +1,12 @@
-- Table: object_wizard_symbol_override
CREATE TABLE [object_wizard_symbol_override] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[symbol_overrides] image(2147483647) NULL,
CONSTRAINT [PK_object_wizard_symbol_override] PRIMARY KEY ([gobject_id], [package_id], [gobject_id], [package_id])
);
GO
ALTER TABLE [object_wizard_symbol_override] ADD FOREIGN KEY ([package_id]) REFERENCES [package] ([package_id]);
GO

View File

@@ -0,0 +1,15 @@
-- Table: object_wizard_symbol_override_mapping
CREATE TABLE [object_wizard_symbol_override_mapping] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[mx_primitive_id] smallint NOT NULL,
[has_local_overrides] bit NOT NULL,
[thumbnail] image(2147483647) NULL,
[preview] image(2147483647) NULL,
CONSTRAINT [PK_object_wizard_symbol_override_mapping] PRIMARY KEY ([gobject_id], [package_id], [mx_primitive_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id])
);
GO
ALTER TABLE [object_wizard_symbol_override_mapping] ADD FOREIGN KEY ([package_id]) REFERENCES [primitive_instance] ([package_id]);
GO

View File

@@ -0,0 +1,9 @@
-- Table: old_checked_in_packages
CREATE TABLE [old_checked_in_packages] (
[package_id] int NULL,
[gobject_id] int NULL,
[is_template] bit NULL,
[is_being_referenced] bit NULL DEFAULT ((0))
);
GO

View File

@@ -0,0 +1,13 @@
-- Table: operation
CREATE TABLE [operation] (
[operation_id] int NOT NULL,
[user_profile_id] int NOT NULL,
[operation_name] nvarchar(300) NOT NULL,
[start_time] datetime NOT NULL DEFAULT (getdate()),
CONSTRAINT [PK_operation] PRIMARY KEY ([operation_id], [user_profile_id])
);
GO
ALTER TABLE [operation] ADD FOREIGN KEY ([user_profile_id]) REFERENCES [user_profile] ([user_profile_id]);
GO

View File

@@ -0,0 +1,13 @@
-- Table: operation_message
CREATE TABLE [operation_message] (
[message_id] int NOT NULL,
[operation_id] int NOT NULL,
[message_text] nvarchar(300) NOT NULL,
[message_time] datetime NOT NULL DEFAULT (getdate()),
CONSTRAINT [PK_operation_message] PRIMARY KEY ([message_id], [operation_id])
);
GO
ALTER TABLE [operation_message] ADD FOREIGN KEY ([operation_id]) REFERENCES [operation] ([operation_id]);
GO

View File

@@ -0,0 +1,11 @@
-- Table: operation_status
CREATE TABLE [operation_status] (
[operation_id] int NOT NULL,
[status] int NOT NULL,
CONSTRAINT [PK_operation_status] PRIMARY KEY ([operation_id], [status], [operation_id])
);
GO
ALTER TABLE [operation_status] ADD FOREIGN KEY ([operation_id]) REFERENCES [operation] ([operation_id]);
GO

View File

@@ -0,0 +1,8 @@
-- Table: operation_status_look_up
CREATE TABLE [operation_status_look_up] (
[status] int NOT NULL,
[status_name] varchar(100) NOT NULL,
CONSTRAINT [PK_operation_status_look_up] PRIMARY KEY ([status])
);
GO

View File

@@ -0,0 +1,16 @@
-- Table: ow_group_def
CREATE TABLE [ow_group_def] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[ow_group_id] int NOT NULL,
[prompt] nvarchar(260) NOT NULL,
[GUID] varchar(36) NOT NULL,
[description] nvarchar(260) NULL,
[visibility_rules] nvarchar(-1) NULL,
CONSTRAINT [PK_ow_group_def] PRIMARY KEY ([gobject_id], [package_id], [ow_group_id], [ow_group_id])
);
GO
ALTER TABLE [ow_group_def] ADD FOREIGN KEY ([ow_group_id]) REFERENCES [ow_group_id] ([ow_group_id]);
GO

View File

@@ -0,0 +1,7 @@
-- Table: ow_group_id
CREATE TABLE [ow_group_id] (
[ow_group_id] int NOT NULL,
CONSTRAINT [PK_ow_group_id] PRIMARY KEY ([ow_group_id])
);
GO

View File

@@ -0,0 +1,13 @@
-- Table: ow_group_override
CREATE TABLE [ow_group_override] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[ow_group_id] int NOT NULL,
[property_bitmask] int NOT NULL,
CONSTRAINT [PK_ow_group_override] PRIMARY KEY ([gobject_id], [package_id], [ow_group_id], [ow_group_id])
);
GO
ALTER TABLE [ow_group_override] ADD FOREIGN KEY ([ow_group_id]) REFERENCES [ow_group_id] ([ow_group_id]);
GO

View File

@@ -0,0 +1,17 @@
-- Table: ow_instance_setting
CREATE TABLE [ow_instance_setting] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[name] nvarchar(329) NOT NULL,
[ow_setting_type] int NOT NULL,
[is_dmv] bit NOT NULL,
[override_value] nvarchar(-1) NULL,
[is_mx] bit NOT NULL,
[is_implicit] bit NULL,
CONSTRAINT [PK_ow_instance_setting] PRIMARY KEY ([gobject_id], [package_id], [name], [ow_setting_type], [is_dmv], [ow_setting_type])
);
GO
ALTER TABLE [ow_instance_setting] ADD FOREIGN KEY ([ow_setting_type]) REFERENCES [ow_lu_setting] ([ow_setting_type]);
GO

View File

@@ -0,0 +1,19 @@
-- Table: ow_link_def
CREATE TABLE [ow_link_def] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[ow_link_id] int NOT NULL,
[ow_link_type] int NOT NULL,
[name] nvarchar(329) NOT NULL,
[mx_primitive_id] smallint NULL,
[dynamic_attribute_id] bigint NULL,
[optional_id] int NULL,
[property_bitmask] int NOT NULL,
[sort] int NOT NULL,
CONSTRAINT [PK_ow_link_def] PRIMARY KEY ([gobject_id], [package_id], [ow_link_id], [ow_link_id])
);
GO
ALTER TABLE [ow_link_def] ADD FOREIGN KEY ([ow_link_id]) REFERENCES [ow_link_id] ([ow_link_id]);
GO

View File

@@ -0,0 +1,11 @@
-- Table: ow_link_id
CREATE TABLE [ow_link_id] (
[ow_link_id] int NOT NULL,
[ow_opt_or_choice_id] int NOT NULL,
CONSTRAINT [PK_ow_link_id] PRIMARY KEY ([ow_link_id], [ow_opt_or_choice_id])
);
GO
ALTER TABLE [ow_link_id] ADD FOREIGN KEY ([ow_opt_or_choice_id]) REFERENCES [ow_opt_or_choice_id] ([ow_opt_or_choice_id]);
GO

View File

@@ -0,0 +1,17 @@
-- Table: ow_lu_definition
CREATE TABLE [ow_lu_definition] (
[ow_setting_type] int NOT NULL,
[primitive_definition_id] int NOT NULL,
[template_definition_id] int NOT NULL,
[boolean_analog] bit NOT NULL,
[ext] varchar(20) NOT NULL,
[link_setting] int NULL,
[link_feature] int NULL,
[mx_attribute_id] smallint NULL,
CONSTRAINT [PK_ow_lu_definition] PRIMARY KEY ([ow_setting_type], [primitive_definition_id], [ow_setting_type])
);
GO
ALTER TABLE [ow_lu_definition] ADD FOREIGN KEY ([ow_setting_type]) REFERENCES [ow_lu_setting] ([ow_setting_type]);
GO

View File

@@ -0,0 +1,18 @@
-- Table: ow_lu_setting
CREATE TABLE [ow_lu_setting] (
[ow_setting_type] int NOT NULL,
[category] varchar(10) NOT NULL,
[mx_data_type] tinyint NULL,
[setting_name] nvarchar(30) NOT NULL,
[feature_id] int NULL,
[feature_sub_id] int NULL,
[parent_type] int NULL,
[no_ext] bit NULL,
[raw_value] nvarchar(100) NULL,
CONSTRAINT [PK_ow_lu_setting] PRIMARY KEY ([ow_setting_type], [mx_data_type])
);
GO
ALTER TABLE [ow_lu_setting] ADD FOREIGN KEY ([mx_data_type]) REFERENCES [data_type] ([mx_data_type]);
GO

View File

@@ -0,0 +1,21 @@
-- Table: ow_opt_or_choice_def
CREATE TABLE [ow_opt_or_choice_def] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[ow_opt_or_choice_id] int NOT NULL,
[prompt] nvarchar(260) NOT NULL,
[GUID] varchar(36) NOT NULL,
[name] varchar(10) NOT NULL,
[description] nvarchar(260) NULL,
[choice_sequence_number] int NULL,
[after_group_or_option] int NULL,
[initial_value] bit NOT NULL DEFAULT ((0)),
[visibility_rules] nvarchar(-1) NULL,
[sort] int NOT NULL,
CONSTRAINT [PK_ow_opt_or_choice_def] PRIMARY KEY ([gobject_id], [package_id], [ow_opt_or_choice_id], [ow_opt_or_choice_id])
);
GO
ALTER TABLE [ow_opt_or_choice_def] ADD FOREIGN KEY ([ow_opt_or_choice_id]) REFERENCES [ow_opt_or_choice_id] ([ow_opt_or_choice_id]);
GO

View File

@@ -0,0 +1,11 @@
-- Table: ow_opt_or_choice_id
CREATE TABLE [ow_opt_or_choice_id] (
[ow_opt_or_choice_id] int NOT NULL,
[ow_group_id] int NOT NULL,
CONSTRAINT [PK_ow_opt_or_choice_id] PRIMARY KEY ([ow_opt_or_choice_id], [ow_group_id])
);
GO
ALTER TABLE [ow_opt_or_choice_id] ADD FOREIGN KEY ([ow_group_id]) REFERENCES [ow_group_id] ([ow_group_id]);
GO

View File

@@ -0,0 +1,14 @@
-- Table: ow_opt_or_choice_override
CREATE TABLE [ow_opt_or_choice_override] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[ow_opt_or_choice_id] int NOT NULL,
[property_bitmask] int NULL,
[override_value] bit NULL,
CONSTRAINT [PK_ow_opt_or_choice_override] PRIMARY KEY ([gobject_id], [package_id], [ow_opt_or_choice_id], [ow_opt_or_choice_id])
);
GO
ALTER TABLE [ow_opt_or_choice_override] ADD FOREIGN KEY ([ow_opt_or_choice_id]) REFERENCES [ow_opt_or_choice_id] ([ow_opt_or_choice_id]);
GO

View File

@@ -0,0 +1,18 @@
-- Table: ow_setting_def
CREATE TABLE [ow_setting_def] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[ow_setting_id] int NOT NULL,
[ow_setting_type] int NOT NULL,
[reference] nvarchar(260) NULL,
[property_id] varchar(36) NULL,
[initial_value] nvarchar(-1) NULL,
[property_bitmask] int NULL,
[sort] int NOT NULL,
CONSTRAINT [PK_ow_setting_def] PRIMARY KEY ([gobject_id], [package_id], [ow_setting_id], [ow_setting_type], [ow_setting_id])
);
GO
ALTER TABLE [ow_setting_def] ADD FOREIGN KEY ([ow_setting_id]) REFERENCES [ow_setting_id] ([ow_setting_id]);
GO

View File

@@ -0,0 +1,11 @@
-- Table: ow_setting_id
CREATE TABLE [ow_setting_id] (
[ow_setting_id] int NOT NULL,
[ow_link_id] int NOT NULL,
CONSTRAINT [PK_ow_setting_id] PRIMARY KEY ([ow_setting_id], [ow_link_id])
);
GO
ALTER TABLE [ow_setting_id] ADD FOREIGN KEY ([ow_link_id]) REFERENCES [ow_link_id] ([ow_link_id]);
GO

View File

@@ -0,0 +1,14 @@
-- Table: ow_setting_override
CREATE TABLE [ow_setting_override] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[ow_setting_id] int NOT NULL,
[override_value] nvarchar(-1) NULL,
[property_bitmask] int NULL,
CONSTRAINT [PK_ow_setting_override] PRIMARY KEY ([gobject_id], [package_id], [ow_setting_id], [ow_setting_id])
);
GO
ALTER TABLE [ow_setting_override] ADD FOREIGN KEY ([ow_setting_id]) REFERENCES [ow_setting_id] ([ow_setting_id]);
GO

View File

@@ -0,0 +1,17 @@
-- Table: ow_symbol_setting
CREATE TABLE [ow_symbol_setting] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[sym_name] nvarchar(33) NOT NULL,
[ow_setting_type] int NOT NULL,
[reference] nvarchar(260) NOT NULL,
[property_id] nvarchar(36) NULL,
[value] nvarchar(-1) NULL,
[property_bitmask] int NULL,
CONSTRAINT [PK_ow_symbol_setting] PRIMARY KEY ([gobject_id], [package_id], [sym_name], [ow_setting_type], [reference], [ow_setting_type])
);
GO
ALTER TABLE [ow_symbol_setting] ADD FOREIGN KEY ([ow_setting_type]) REFERENCES [ow_lu_setting] ([ow_setting_type]);
GO

View File

@@ -0,0 +1,21 @@
-- Table: owned_visual_element
CREATE TABLE [owned_visual_element] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[mx_primitive_id] smallint NOT NULL,
[visual_element_id] int NOT NULL,
[thumbnail] image(2147483647) NULL,
[description] nvarchar(1024) NULL,
[visual_element_definition] image(2147483647) NOT NULL,
[is_thumbnail_dirty] bit NOT NULL DEFAULT ((0)),
[visual_element_definition_grm] image(2147483647) NOT NULL,
[content_type] nvarchar(1024) NULL,
[visual_element_crossRef] nvarchar(-1) NULL,
[preview] image(2147483647) NULL,
CONSTRAINT [PK_owned_visual_element] PRIMARY KEY ([gobject_id], [package_id], [mx_primitive_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id])
);
GO
ALTER TABLE [owned_visual_element] ADD FOREIGN KEY ([package_id]) REFERENCES [visual_element_version] ([package_id]);
GO

21
gr/ddl/tables/package.sql Normal file
View File

@@ -0,0 +1,21 @@
-- Table: package
CREATE TABLE [package] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[status_id] int NOT NULL DEFAULT ((0)),
[reference_status_id] int NOT NULL DEFAULT ((0)),
[instance_attributes] image(2147483647) NULL,
[operation_status] int NOT NULL DEFAULT ((0)),
[security_group] nvarchar(32) NOT NULL DEFAULT ('Default'),
[derived_from_package_id] int NOT NULL DEFAULT ((0)),
[deployable_configuration_version] int NOT NULL DEFAULT ((0)),
[package_type] nvarchar(5) NOT NULL DEFAULT ('I'),
[package_version] smallint NOT NULL DEFAULT ((0)),
[object_status] smallint NOT NULL DEFAULT ((0)),
CONSTRAINT [PK_package] PRIMARY KEY ([gobject_id], [package_id], [gobject_id], [status_id])
);
GO
ALTER TABLE [package] ADD FOREIGN KEY ([status_id]) REFERENCES [lookup_status] ([status_id]);
GO

View File

@@ -0,0 +1,8 @@
-- Table: packages_to_be_deleted
CREATE TABLE [packages_to_be_deleted] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
CONSTRAINT [PK_packages_to_be_deleted] PRIMARY KEY ([gobject_id], [package_id])
);
GO

View File

@@ -0,0 +1,21 @@
-- Table: platform
CREATE TABLE [platform] (
[platform_id] int NOT NULL,
[platform_gobject_id] int NOT NULL,
[node_name] nvarchar(256) NOT NULL DEFAULT (''),
[last_deployed_node_name] nvarchar(256) NOT NULL DEFAULT (''),
[rmcNode_name] nvarchar(256) NOT NULL DEFAULT (''),
[last_deployed_rmcNode_name] nvarchar(256) NOT NULL DEFAULT (''),
[portNMX] int NOT NULL DEFAULT ((0)),
[last_deployed_portNMX] int NOT NULL DEFAULT ((0)),
[portRMC] int NOT NULL DEFAULT ((0)),
[last_deployed_portRMC] int NOT NULL DEFAULT ((0)),
[portRPC] int NOT NULL DEFAULT ((0)),
[last_deployed_portRPC] int NOT NULL DEFAULT ((0)),
CONSTRAINT [PK_platform] PRIMARY KEY ([platform_gobject_id], [platform_gobject_id])
);
GO
ALTER TABLE [platform] ADD FOREIGN KEY ([platform_gobject_id]) REFERENCES [gobject] ([gobject_id]);
GO

View File

@@ -0,0 +1,11 @@
-- Table: platform_license
CREATE TABLE [platform_license] (
[gobject_id] int NOT NULL,
[license_type] int NOT NULL,
CONSTRAINT [PK_platform_license] PRIMARY KEY ([gobject_id], [gobject_id])
);
GO
ALTER TABLE [platform_license] ADD FOREIGN KEY ([gobject_id]) REFERENCES [gobject] ([gobject_id]);
GO

View File

@@ -0,0 +1,15 @@
-- Table: primitive_attribute_validation_results
CREATE TABLE [primitive_attribute_validation_results] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[mx_primitive_id] smallint NOT NULL,
[mx_attribute_id] smallint NOT NULL,
[validationCode] nvarchar(329) NOT NULL,
[validationState] smallint NOT NULL,
CONSTRAINT [PK_primitive_attribute_validation_results] PRIMARY KEY ([gobject_id], [package_id], [mx_primitive_id], [mx_attribute_id], [validationCode], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id])
);
GO
ALTER TABLE [primitive_attribute_validation_results] ADD FOREIGN KEY ([package_id]) REFERENCES [primitive_instance] ([package_id]);
GO

View File

@@ -0,0 +1,11 @@
-- Table: primitive_data_type
CREATE TABLE [primitive_data_type] (
[mx_data_type] tinyint NOT NULL,
[primitive_definition_id] int NOT NULL,
CONSTRAINT [PK_primitive_data_type] PRIMARY KEY ([mx_data_type], [primitive_definition_id], [mx_data_type], [primitive_definition_id])
);
GO
ALTER TABLE [primitive_data_type] ADD FOREIGN KEY ([primitive_definition_id]) REFERENCES [primitive_definition] ([primitive_definition_id]);
GO

View File

@@ -0,0 +1,21 @@
-- 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

View File

@@ -0,0 +1,34 @@
-- Table: primitive_instance
CREATE TABLE [primitive_instance] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[mx_primitive_id] smallint NOT NULL,
[primitive_definition_id] int NOT NULL,
[primitive_name] nvarchar(329) NOT NULL,
[parent_mx_primitive_id] smallint NOT NULL,
[execution_group] int NOT NULL,
[execution_order] int NOT NULL DEFAULT ((-1)),
[owned_by_gobject_id] int NOT NULL DEFAULT ((0)),
[timestamp_of_last_change] bigint NULL DEFAULT ((0)),
[max_child_timestamp] bigint NULL DEFAULT ((0)),
[extension_type] nvarchar(329) NULL,
[is_object_extension] bit NULL DEFAULT ((0)),
[checked_in_primitive_version] int NOT NULL DEFAULT ((1)),
[checked_out_primitive_version] int NOT NULL DEFAULT ((1)),
[entity_change_type] int NOT NULL DEFAULT ((1)),
[operation_on_primitive_mask] int NOT NULL DEFAULT ((0)),
[created_by_parent] smallint NOT NULL DEFAULT ((0)),
[status_id] smallint NOT NULL DEFAULT ((0)),
[ref_status_id] smallint NOT NULL DEFAULT ((0)),
[primitive_attributes] image(2147483647) NULL,
[mx_value_errors] text(2147483647) NOT NULL,
[mx_value_warnings] text(2147483647) NOT NULL,
[mx_value_reference_warnings] text(2147483647) NOT NULL,
[property_bitmask] smallint NOT NULL DEFAULT ((0)),
CONSTRAINT [PK_primitive_instance] PRIMARY KEY ([gobject_id], [package_id], [mx_primitive_id], [gobject_id], [package_id], [gobject_id], [package_id])
);
GO
ALTER TABLE [primitive_instance] ADD FOREIGN KEY ([package_id]) REFERENCES [package] ([package_id]);
GO

View File

@@ -0,0 +1,15 @@
-- Table: primitive_instance_feature_link
CREATE TABLE [primitive_instance_feature_link] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[mx_primitive_id] smallint NOT NULL,
[feature_id] int NOT NULL,
[feature_name] nvarchar(256) NOT NULL DEFAULT (''),
[feature_type] nvarchar(256) NOT NULL DEFAULT (''),
CONSTRAINT [PK_primitive_instance_feature_link] PRIMARY KEY ([gobject_id], [package_id], [mx_primitive_id], [feature_id], [feature_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id])
);
GO
ALTER TABLE [primitive_instance_feature_link] ADD FOREIGN KEY ([package_id]) REFERENCES [primitive_instance] ([package_id]);
GO

View File

@@ -0,0 +1,16 @@
-- Table: primitive_instance_file_table_link
CREATE TABLE [primitive_instance_file_table_link] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[mx_primitive_id] smallint NOT NULL,
[file_id] int NOT NULL,
[is_needed_for_package] bit NOT NULL DEFAULT ((0)),
[is_needed_for_runtime] bit NOT NULL DEFAULT ((0)),
[is_needed_for_editor] bit NOT NULL DEFAULT ((0)),
CONSTRAINT [PK_primitive_instance_file_table_link] PRIMARY KEY ([gobject_id], [package_id], [mx_primitive_id], [file_id], [file_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id], [gobject_id], [mx_primitive_id], [package_id])
);
GO
ALTER TABLE [primitive_instance_file_table_link] ADD FOREIGN KEY ([package_id]) REFERENCES [primitive_instance] ([package_id]);
GO

View File

@@ -0,0 +1,9 @@
-- Table: proxy_timestamp
CREATE TABLE [proxy_timestamp] (
[gobject_id] int NOT NULL,
[timestamp_of_last_change] timestamp NOT NULL,
[ImportGUID] nvarchar(265) NULL,
CONSTRAINT [PK_proxy_timestamp] PRIMARY KEY ([gobject_id])
);
GO

View File

@@ -0,0 +1,8 @@
-- Table: redundancy
CREATE TABLE [redundancy] (
[primary_gobject_id] int NOT NULL,
[backup_gobject_id] int NOT NULL,
CONSTRAINT [PK_redundancy] PRIMARY KEY ([primary_gobject_id], [backup_gobject_id])
);
GO

View File

@@ -0,0 +1,14 @@
-- Table: renamed_visual_element
CREATE TABLE [renamed_visual_element] (
[gobject_id] int NOT NULL,
[package_id] int NOT NULL,
[mx_primitive_id] smallint NOT NULL,
[visual_element_id] int NOT NULL,
[old_visual_element_name] nvarchar(329) NOT NULL,
[new_visual_element_name] nvarchar(329) NOT NULL,
[visual_element_type] nvarchar(32) NOT NULL,
[timestamp_of_rename] timestamp NOT NULL,
CONSTRAINT [PK_renamed_visual_element] PRIMARY KEY ([gobject_id], [package_id], [timestamp_of_rename])
);
GO

View File

@@ -0,0 +1,9 @@
-- Table: schema_version
CREATE TABLE [schema_version] (
[version_number] int NOT NULL,
[version_string] nvarchar(64) NOT NULL,
[cdi_version] nvarchar(64) NOT NULL,
[old_version_number] int NOT NULL DEFAULT ((0))
);
GO

View File

@@ -0,0 +1,7 @@
-- Table: supported_locales
CREATE TABLE [supported_locales] (
[locale_id] smallint NOT NULL,
CONSTRAINT [PK_supported_locales] PRIMARY KEY ([locale_id])
);
GO

Some files were not shown because too many files have changed in this diff Show More