chore: post-audit cleanup — gr/ relocated, scratch + PR-body snapshots removed
- gr/ folder moved to sibling repo at C:\Users\dohertj2\Desktop\graccess\gr;
the SQL queries + DDL captures belong with the graccess CLI work, not
with the OPC UA server. PR 7.2 retired direct Galaxy-DB access from this
repo (mxaccessgw owns those queries server-side now).
- Drop the now-obsolete "Galaxy Repository Database" section in CLAUDE.md
for the same reason — server no longer queries the DB directly.
- Delete root scratch files surfaced by the doc audit (runtimestatus.md,
service_info.md) — abandoned plan + operational scratch.
- Delete docs/v2/implementation/pr-{1,2,4}-body.md — ephemeral PR-body
snapshots from the v2-mxgw rollout.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
13
CLAUDE.md
13
CLAUDE.md
@@ -58,19 +58,6 @@ Galaxy `mx_data_type` values map to OPC UA types (Boolean, Int32, Float, Double,
|
||||
|
||||
The gateway lives in a sibling repo at `c:\Users\dohertj2\Desktop\mxaccessgw\`. See `docs/v2/Galaxy.ParityRig.md` for the gw setup recipe (build, API key provisioning via `apikey create-key`, env-var overrides for HTTP/2 cleartext + worker path). The gw's MXAccess Toolkit reference (its `gateway.md`) is the canonical MxAccess API doc; the standalone `mxaccess_documentation.md` previously kept in this repo retired in PR 7.3.
|
||||
|
||||
## Galaxy Repository Database
|
||||
|
||||
Connection: `sqlcmd -S localhost -d ZB -E` (Windows Auth). See `gr/connectioninfo.md`.
|
||||
|
||||
The `gr/` folder contains:
|
||||
- `queries/` — SQL for hierarchy extraction, attribute lookup, and change detection
|
||||
- `ddl/tables/` and `ddl/views/` — Schema definitions
|
||||
- `schema.md` — Full table/view reference
|
||||
- `build_layout_plan.md` — Step-by-step plan for building the OPC UA address space from DB queries
|
||||
- `gr/CLAUDE.md` — Detailed guidance for working within the `gr/` subfolder
|
||||
|
||||
Key tables: `gobject` (hierarchy/deployment), `template_definition` (object categories), `dynamic_attribute` (user-defined attributes), `primitive_instance` (primitive-to-attribute links), `galaxy` (change detection).
|
||||
|
||||
## Build Commands
|
||||
|
||||
```bash
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
# PR 1 — Phase 1 + Phase 2 A/B/C → v2
|
||||
|
||||
**Source**: `phase-1-configuration` (commits `980ea51..7403b92`, 11 commits)
|
||||
**Target**: `v2`
|
||||
**URL**: https://gitea.dohertylan.com/dohertj2/lmxopcua/pulls/new/phase-1-configuration
|
||||
|
||||
## Summary
|
||||
|
||||
- **Phase 1 complete** — Configuration project with 16 entities + 3 EF migrations
|
||||
(InitialSchema + 8 stored procs + AuthorizationGrants), Core + Server + full Admin UI
|
||||
(Blazor Server with cluster CRUD, draft → diff → publish → rollback, equipment with
|
||||
OPC 40010, UNS, namespaces, drivers, ACLs, reservations, audit), LDAP via GLAuth
|
||||
(`localhost:3893`), SignalR real-time fleet status + alerts.
|
||||
- **Phase 2 Streams A + B + C feature-complete** — full IPC contract surface
|
||||
(Galaxy.Shared, netstandard2.0, MessagePack), Galaxy.Host with real Win32 STA pump,
|
||||
ACL + caller-SID + per-process-secret IPC, Galaxy-specific MemoryWatchdog +
|
||||
RecyclePolicy + PostMortemMmf + MxAccessHandle, three `IGalaxyBackend`
|
||||
implementations (Stub / DbBacked / **MxAccess** — real ArchestrA.MxAccess.dll
|
||||
reference, x86, smoke-tested live against `LMXProxyServer`), Galaxy.Proxy with all
|
||||
9 capability interfaces (`IDriver` / `ITagDiscovery` / `IReadable` / `IWritable` /
|
||||
`ISubscribable` / `IAlarmSource` / `IHistoryProvider` / `IRediscoverable` /
|
||||
`IHostConnectivityProbe`) + supervisor (Backoff + CircuitBreaker +
|
||||
HeartbeatMonitor).
|
||||
- **Phase 2 Stream D non-destructive deliverables** — appsettings.json → DriverConfig
|
||||
migration script, two-service Windows installer scripts, process-spawn cross-FX
|
||||
parity test, Stream D removal procedure doc with both Option A (rewrite 494 v1
|
||||
tests) and Option B (archive + new v2 E2E suite) spelled out step-by-step.
|
||||
|
||||
## What's NOT in this PR
|
||||
|
||||
- Legacy `OtOpcUa.Host` deletion (Stream D.1) — reserved for a follow-up PR after
|
||||
Option B's E2E suite is green. The 494 v1 tests still pass against the unchanged
|
||||
legacy Host.
|
||||
- Live-Galaxy parity validation (Stream E) — needs the iterative debug cycle the
|
||||
removal-procedure doc describes.
|
||||
|
||||
## Tests
|
||||
|
||||
**964 pass / 1 pre-existing Phase 0 baseline failure**, across 14 test projects:
|
||||
|
||||
| Project | Pass | Notes |
|
||||
|---|---:|---|
|
||||
| Core.Abstractions.Tests | 24 | |
|
||||
| Configuration.Tests | 42 | incl. 7 schema compliance, 8 stored-proc, 3 SQL-role auth, 13 validator, 6 LiteDB cache, 5 generation-applier |
|
||||
| Core.Tests | 4 | DriverHost lifecycle |
|
||||
| Server.Tests | 2 | NodeBootstrap + LiteDB cache fallback |
|
||||
| Admin.Tests | 21 | incl. 5 RoleMapper, 6 LdapAuth, 3 LiveLdap, 2 FleetStatusPoller, 2 services-integration |
|
||||
| Driver.Galaxy.Shared.Tests | 6 | Round-trip + framing |
|
||||
| Driver.Galaxy.Host.Tests | 30 | incl. 5 GalaxyRepository live ZB, 3 live MXAccess COM, 5 EndToEndIpc, 2 IpcHandshake, 4 MemoryWatchdog, 3 RecyclePolicy, 3 PostMortemMmf, 3 StaPump, 2 service-installer dry-run |
|
||||
| Driver.Galaxy.Proxy.Tests | 10 | 9 unit + 1 process-spawn parity |
|
||||
| Client.Shared.Tests | 131 | unchanged |
|
||||
| Client.UI.Tests | 98 | unchanged |
|
||||
| Client.CLI.Tests | 51 / 1 fail | pre-existing baseline failure |
|
||||
| Historian.Aveva.Tests | 41 | unchanged |
|
||||
| IntegrationTests (net48) | 6 | unchanged — v1 parity baseline |
|
||||
| **OtOpcUa.Tests (net48)** | **494** | **unchanged — v1 parity baseline** |
|
||||
|
||||
## Test plan for reviewers
|
||||
|
||||
- [ ] `dotnet build ZB.MOM.WW.OtOpcUa.slnx` succeeds with no warnings beyond the
|
||||
known NuGetAuditSuppress + xUnit1051 warnings
|
||||
- [ ] `dotnet test ZB.MOM.WW.OtOpcUa.slnx` shows the same 964/1 result
|
||||
- [ ] `Get-Service aaGR, aaBootstrap` reports Running on the merger's box
|
||||
- [ ] `docker ps --filter name=otopcua-mssql` shows the SQL container Up
|
||||
- [ ] Admin UI boots (`dotnet run --project src/ZB.MOM.WW.OtOpcUa.Admin`); home page
|
||||
renders at http://localhost:5123/; LDAP sign-in with GLAuth `readonly` /
|
||||
`readonly123` succeeds
|
||||
- [ ] Migration script dry-run: `powershell -File
|
||||
scripts/migration/Migrate-AppSettings-To-DriverConfig.ps1 -DryRun` produces
|
||||
a well-formed DriverConfig JSON
|
||||
- [ ] Spot-read three commit messages to confirm the deferred-with-rationale items
|
||||
are explicitly documented (`549cd36`, `a7126ba`, `7403b92` are the most
|
||||
recent and most detailed)
|
||||
|
||||
## Follow-up tracking
|
||||
|
||||
PR 2 (next session) will execute Stream D Option B — archive `OtOpcUa.Tests` as
|
||||
`OtOpcUa.Tests.v1Archive`, build the new `OtOpcUa.Driver.Galaxy.E2E` test project,
|
||||
delete legacy `OtOpcUa.Host`, and run the parity-validation cycle. See
|
||||
`docs/v2/implementation/stream-d-removal-procedure.md`.
|
||||
@@ -1,69 +0,0 @@
|
||||
# PR 2 — Phase 2 Stream D Option B (archive v1 + E2E suite) → v2
|
||||
|
||||
**Source**: `phase-2-stream-d` (branched from `phase-1-configuration`)
|
||||
**Target**: `v2`
|
||||
**URL** (after push): https://gitea.dohertylan.com/dohertj2/lmxopcua/pulls/new/phase-2-stream-d
|
||||
|
||||
## Summary
|
||||
|
||||
Phase 2 Stream D Option B per `docs/v2/implementation/stream-d-removal-procedure.md`:
|
||||
|
||||
- **Archived the v1 surface** without deleting:
|
||||
- `tests/ZB.MOM.WW.OtOpcUa.Tests/` → `tests/ZB.MOM.WW.OtOpcUa.Tests.v1Archive/`
|
||||
(`<AssemblyName>` kept as `ZB.MOM.WW.OtOpcUa.Tests` so v1 Host's `InternalsVisibleTo`
|
||||
still matches; `<IsTestProject>false</IsTestProject>` so solution test runs skip it).
|
||||
- `tests/ZB.MOM.WW.OtOpcUa.IntegrationTests/` — `<IsTestProject>false</IsTestProject>`
|
||||
+ archive comment.
|
||||
- `src/ZB.MOM.WW.OtOpcUa.Host/` + `src/ZB.MOM.WW.OtOpcUa.Historian.Aveva/` — archive
|
||||
PropertyGroup comments. Both still build (Historian plugin + 41 historian tests still
|
||||
pass) so Phase 2 PR 3 can delete them in a focused, reviewable destructive change.
|
||||
- **New `tests/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.E2E/`** test project (.NET 10):
|
||||
- `ParityFixture` spawns `OtOpcUa.Driver.Galaxy.Host.exe` (net48 x86) as a subprocess via
|
||||
`Process.Start`, connects via real named pipe, exposes a connected `GalaxyProxyDriver`.
|
||||
Skips when Galaxy ZB unreachable / Host EXE not built / Administrator shell.
|
||||
- `HierarchyParityTests` (3) and `StabilityFindingsRegressionTests` (4) — one test per
|
||||
2026-04-13 stability finding (phantom probe, cross-host quality clear, sync-over-async,
|
||||
fire-and-forget alarm shutdown race).
|
||||
- **`docs/v2/V1_ARCHIVE_STATUS.md`** — inventory + deletion plan for PR 3.
|
||||
- **`docs/v2/implementation/exit-gate-phase-2-final.md`** — supersedes the two partial-exit
|
||||
docs with the as-built state, adversarial review of PR 2 deltas (4 new findings), and the
|
||||
recommended PR sequence (1 → 2 → 3 → 4).
|
||||
|
||||
## What's NOT in this PR
|
||||
|
||||
- Deletion of the v1 archive — saved for PR 3 with explicit operator review (destructive change).
|
||||
- Wonderware Historian SDK plugin port — Task B.1.h, follow-up to enable real `HistoryRead`.
|
||||
- MxAccess subscription push-frames — Task B.1.s, follow-up to enable real-time
|
||||
data-change push from Host → Proxy.
|
||||
|
||||
## Tests
|
||||
|
||||
**`dotnet test ZB.MOM.WW.OtOpcUa.slnx`**: **470 pass / 7 skip / 1 pre-existing baseline**.
|
||||
|
||||
The 7 skips are the new E2E tests, all skipping with the documented reason
|
||||
"PipeAcl denies Administrators on dev shells" — the production install runs as a non-admin
|
||||
service account and these tests will execute there.
|
||||
|
||||
Run the archived v1 suites explicitly:
|
||||
```powershell
|
||||
dotnet test tests/ZB.MOM.WW.OtOpcUa.Tests.v1Archive # → 494 pass
|
||||
dotnet test tests/ZB.MOM.WW.OtOpcUa.IntegrationTests # → 6 pass
|
||||
```
|
||||
|
||||
## Test plan for reviewers
|
||||
|
||||
- [ ] `dotnet build ZB.MOM.WW.OtOpcUa.slnx` succeeds with no warnings beyond the known
|
||||
NuGetAuditSuppress + NU1702 cross-FX
|
||||
- [ ] `dotnet test ZB.MOM.WW.OtOpcUa.slnx` shows the 470/7-skip/1-baseline result
|
||||
- [ ] Both archived suites pass when run explicitly
|
||||
- [ ] Build the Galaxy.Host EXE (`dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Host`),
|
||||
then run E2E tests on a non-admin shell — they should actually execute and pass
|
||||
against live Galaxy ZB
|
||||
- [ ] Spot-read `docs/v2/V1_ARCHIVE_STATUS.md` and confirm the deletion plan is acceptable
|
||||
|
||||
## Follow-up tracking
|
||||
|
||||
- **PR 3** (next session, when ready): execute the deletion plan in `V1_ARCHIVE_STATUS.md`.
|
||||
4 projects removed, .slnx updated, full solution test confirms parity.
|
||||
- **PR 4** (Phase 2 follow-up): port Historian plugin + wire MxAccess subscription pushes +
|
||||
close the high/medium open findings from `exit-gate-phase-2-final.md`.
|
||||
@@ -1,91 +0,0 @@
|
||||
# PR 4 — Phase 2 follow-up: close the 4 open MXAccess findings
|
||||
|
||||
**Source**: `phase-2-pr4-findings` (branched from `phase-2-stream-d`)
|
||||
**Target**: `v2`
|
||||
|
||||
## Summary
|
||||
|
||||
Closes the 4 high/medium open findings carried forward in `exit-gate-phase-2-final.md`:
|
||||
|
||||
- **High 1 — `ReadAsync` subscription-leak on cancel.** One-shot read now wraps the
|
||||
subscribe→first-OnDataChange→unsubscribe pattern in a `try/finally` so the per-tag
|
||||
callback is always detached, and if the read installed the underlying MXAccess
|
||||
subscription itself (no other caller had it), it tears it down on the way out.
|
||||
- **High 2 — No reconnect loop on the MXAccess COM connection.** New
|
||||
`MxAccessClientOptions { AutoReconnect, MonitorInterval, StaleThreshold }` + a background
|
||||
`MonitorLoopAsync` that watches a stale-activity threshold + probes the proxy via a
|
||||
no-op COM call, then reconnects-with-replay (re-Register, re-AddItem every active
|
||||
subscription) when the proxy is dead. Liveness signal: every `OnDataChange` callback bumps
|
||||
`_lastObservedActivityUtc`. Defaults match v1 monitor cadence (5s poll, 60s stale).
|
||||
`ReconnectCount` exposed for diagnostics; `ConnectionStateChanged` event for downstream
|
||||
consumers (the supervisor on the Proxy side already surfaces this through its
|
||||
HeartbeatMonitor, but the Host-side event lets local logging/metrics hook in).
|
||||
- **Medium 3 — `MxAccessGalaxyBackend.SubscribeAsync` doesn't push OnDataChange frames back to
|
||||
the Proxy.** New `IGalaxyBackend.OnDataChange` / `OnAlarmEvent` / `OnHostStatusChanged`
|
||||
events that the new `GalaxyFrameHandler.AttachConnection` subscribes per-connection and
|
||||
forwards as outbound `OnDataChangeNotification` / `AlarmEvent` /
|
||||
`RuntimeStatusChange` frames through the connection's `FrameWriter`. `MxAccessGalaxyBackend`
|
||||
fans out per-tag value changes to every `SubscriptionId` that's listening to that tag
|
||||
(multiple Proxy subs may share a Galaxy attribute — single COM subscription, multi-fan-out
|
||||
on the wire). Stub + DbBacked backends declare the events with `#pragma warning disable
|
||||
CS0067` (treat-warnings-as-errors would otherwise fail on never-raised events that exist
|
||||
only to satisfy the interface).
|
||||
- **Medium 4 — `WriteValuesAsync` doesn't await `OnWriteComplete`.** New
|
||||
`WriteAsync(...)` overload returns `bool` after awaiting the OnWriteComplete callback via
|
||||
the v1-style `TaskCompletionSource`-keyed-by-item-handle pattern in `_pendingWrites`.
|
||||
`MxAccessGalaxyBackend.WriteValuesAsync` now reports per-tag `Bad_InternalError` when the
|
||||
runtime rejected the write, instead of false-positive `Good`.
|
||||
|
||||
## Pipe server change
|
||||
|
||||
`IFrameHandler` gains `AttachConnection(FrameWriter writer): IDisposable` so the handler can
|
||||
register backend event sinks on each accepted connection and detach them at disconnect. The
|
||||
`PipeServer.RunOneConnectionAsync` calls it after the Hello handshake and disposes it in the
|
||||
finally of the per-connection scope. `StubFrameHandler` returns `IFrameHandler.NoopAttachment.Instance`
|
||||
(net48 doesn't support default interface methods, so the empty-attach lives as a public nested
|
||||
class).
|
||||
|
||||
## Tests
|
||||
|
||||
**`dotnet test ZB.MOM.WW.OtOpcUa.slnx`**: **460 pass / 7 skip (E2E on admin shell) / 1
|
||||
pre-existing baseline failure**. No regressions. The Driver.Galaxy.Host unit tests + 5 live
|
||||
ZB smoke + 3 live MXAccess COM smoke all pass unchanged.
|
||||
|
||||
## Test plan for reviewers
|
||||
|
||||
- [ ] `dotnet build` clean
|
||||
- [ ] `dotnet test` shows 460/7-skip/1-baseline
|
||||
- [ ] Spot-check `MxAccessClient.MonitorLoopAsync` against v1's `MxAccessClient.Monitor`
|
||||
partial (`src/ZB.MOM.WW.OtOpcUa.Host/MxAccess/MxAccessClient.Monitor.cs`) — same
|
||||
polling cadence, same probe-then-reconnect-with-replay shape
|
||||
- [ ] Read `GalaxyFrameHandler.ConnectionSink.Dispose` and confirm event handlers are
|
||||
detached on connection close (no leaked invocation list refs)
|
||||
- [ ] `WriteValuesAsync` returning `Bad_InternalError` on a runtime-rejected write is the
|
||||
correct shape — confirm against the v1 `MxAccessClient.ReadWrite.cs` pattern
|
||||
|
||||
## What's NOT in this PR
|
||||
|
||||
- Wonderware Historian SDK plugin port (Task B.1.h) — separate PR, larger scope.
|
||||
- Alarm subsystem wire-up (`MxAccessGalaxyBackend.SubscribeAlarmsAsync` is still a no-op).
|
||||
`OnAlarmEvent` is declared on the backend interface and pushed by the frame handler when
|
||||
raised; `MxAccessGalaxyBackend` just doesn't raise it yet (waits for the alarm-tracking
|
||||
port from v1's `AlarmObjectFilter` + Galaxy alarm primitives).
|
||||
- Host-status push (`OnHostStatusChanged`) — declared on the interface and pushed by the
|
||||
frame handler; `MxAccessGalaxyBackend` doesn't raise it (the Galaxy.Host's
|
||||
`HostConnectivityProbe` from v1 needs porting too, scoped under the Historian PR).
|
||||
|
||||
## Adversarial review
|
||||
|
||||
Quick pass over the PR 4 deltas. No new findings beyond:
|
||||
|
||||
- **Low 1** — `MonitorLoopAsync`'s `$Heartbeat` probe item-handle is leaked
|
||||
(`AddItem` succeeds, never `RemoveItem`'d). Cosmetic — the probe item is internal to
|
||||
the COM connection, dies with `Unregister` at disconnect/recycle. Worth a follow-up
|
||||
to call `RemoveItem` after the probe succeeds.
|
||||
- **Low 2** — Replay loop in `MonitorLoopAsync` swallows per-subscription failures. If
|
||||
Galaxy permanently rejects a previously-valid reference (rare but possible after a
|
||||
re-deploy), the user gets silent data loss for that one subscription. The stub-handler-
|
||||
unaware operator wouldn't notice. Worth surfacing as a `ConnectionStateChanged(false)
|
||||
→ ConnectionStateChanged(true)` payload that includes the replay-failures list.
|
||||
|
||||
Both are low-priority follow-ups, not PR 4 blockers.
|
||||
51
gr/CLAUDE.md
51
gr/CLAUDE.md
@@ -1,51 +0,0 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Purpose
|
||||
|
||||
The goal of this project is to identify and develop SQL queries that extract the Galaxy object hierarchy from the **System Platform Galaxy Repository** database in order to build a tag structure for an OPC UA server.
|
||||
|
||||
Specifically, we need to:
|
||||
- Build the hierarchy of **areas** and **automation objects** (using contained names for human-readable browsing)
|
||||
- Translate contained names to **tag_names** for read/write operations (e.g., `TestMachine_001.DelmiaReceiver` in the hierarchy becomes `DelmiaReceiver_001` when addressing tag values)
|
||||
|
||||
See `layout.md` for details on the hierarchy vs tag name relationship.
|
||||
|
||||
## Key Files
|
||||
|
||||
### Documentation
|
||||
- `connectioninfo.md` — Database connection details and sqlcmd usage
|
||||
- `layout.md` — Galaxy object hierarchy, contained_name vs tag_name translation, and target OPC UA structure
|
||||
- `build_layout_plan.md` — Step-by-step plan for extracting hierarchy, attaching attributes, and monitoring for changes
|
||||
- `data_type_mapping.md` — Galaxy mx_data_type to OPC UA DataType mapping, including array handling (ValueRank, ArrayDimensions)
|
||||
|
||||
### Queries
|
||||
- `queries/hierarchy.sql` — Deployed object hierarchy with browse names and parent relationships
|
||||
- `queries/attributes.sql` — User-defined (dynamic) attributes with data types and array dimensions
|
||||
- `queries/attributes_extended.sql` — All attributes (system + user-defined) with data types and array dimensions
|
||||
- `queries/change_detection.sql` — Poll `galaxy.time_of_last_deploy` to detect deployment changes
|
||||
|
||||
### Schema Reference
|
||||
- `schema.md` — Full schema reference for all tables and views in the ZB database
|
||||
- `ddl/tables/` — Individual CREATE TABLE definitions
|
||||
- `ddl/views/` — Individual view definitions
|
||||
|
||||
## Working with the Galaxy Repository Database
|
||||
|
||||
The Galaxy Repository is the backing SQL Server database for Wonderware/AVEVA System Platform (Galaxy: ZB, localhost, Windows Auth). Key tables used by the queries:
|
||||
|
||||
- **gobject** — Object instances, hierarchy (contained_by_gobject_id, area_gobject_id), deployment state (deployed_package_id)
|
||||
- **template_definition** — Object type categories (category_id distinguishes areas, engines, user-defined objects, etc.)
|
||||
- **dynamic_attribute** — User-defined attributes on templates, inherited by instances via derived_from_gobject_id chain
|
||||
- **attribute_definition** — System/primitive attributes
|
||||
- **primitive_instance** — Links objects to their primitive components and attribute definitions
|
||||
- **galaxy** — Single-row table with time_of_last_deploy for change detection
|
||||
|
||||
Use `sqlcmd -S localhost -d ZB -E -Q "..."` to run queries. See `connectioninfo.md` for details.
|
||||
|
||||
## Conventions
|
||||
|
||||
- Store all connection parameters in `connectioninfo.md`, not scattered across scripts.
|
||||
- Keep SQL query examples and extraction notes as Markdown files in this repo.
|
||||
- If scripts are added (Python, PowerShell, etc.), document their usage and dependencies alongside them.
|
||||
@@ -1,84 +0,0 @@
|
||||
# OPC UA Server Layout — Build Plan
|
||||
|
||||
## Overview
|
||||
|
||||
Extract the Galaxy object hierarchy and tag definitions from the ZB (Galaxy Repository) database to construct an OPC UA server address space. The root node is hardcoded as **ZB**.
|
||||
|
||||
## Step 1: Build the Browse Tree
|
||||
|
||||
Run `queries/hierarchy.sql` to get all deployed automation objects and their parent-child relationships.
|
||||
|
||||
For each row returned:
|
||||
- `parent_gobject_id = 0` → child of the root ZB node
|
||||
- `is_area = 1` → create as an OPC UA folder node (organizational)
|
||||
- `is_area = 0` → create as an OPC UA object node (container for tags)
|
||||
- Use `browse_name` as the OPC UA BrowseName/DisplayName
|
||||
- Store `gobject_id` and `tag_name` for attribute lookup and tag reference translation
|
||||
|
||||
Build the tree by matching each row's `parent_gobject_id` to another row's `gobject_id`. The result is:
|
||||
|
||||
```
|
||||
ZB (root, hardcoded)
|
||||
└── DEV (folder, is_area=1)
|
||||
├── DevAppEngine (object)
|
||||
├── DevPlatform (object)
|
||||
└── TestArea (folder, is_area=1)
|
||||
├── DevTestObject (object)
|
||||
└── TestMachine_001 (object)
|
||||
├── DelmiaReceiver (object, browse_name from contained_name)
|
||||
└── MESReceiver (object, browse_name from contained_name)
|
||||
```
|
||||
|
||||
## Step 2: Attach Attributes as Tag Nodes
|
||||
|
||||
Run `queries/attributes.sql` to get all user-defined attributes for deployed objects.
|
||||
|
||||
For each attribute row:
|
||||
- Match to the browse tree via `gobject_id`
|
||||
- Create an OPC UA variable node under the matching object node
|
||||
- Use `attribute_name` as the BrowseName/DisplayName
|
||||
- Use `full_tag_reference` as the runtime tag path for read/write operations
|
||||
- Map `mx_data_type` to OPC UA built-in types:
|
||||
|
||||
| mx_data_type | Description | OPC UA Type |
|
||||
|--------------|-------------|-------------|
|
||||
| 1 | Boolean | Boolean |
|
||||
| 2 | Integer | Int32 |
|
||||
| 3 | Float | Float |
|
||||
| 4 | Double | Double |
|
||||
| 5 | String | String |
|
||||
| 6 | Time | DateTime |
|
||||
| 7 | ElapsedTime | Double (seconds) or Duration |
|
||||
|
||||
- If `is_array = 1`, create the variable as an array with rank 1 and dimension from `array_dimension`
|
||||
|
||||
## Step 3: Monitor for Changes
|
||||
|
||||
Poll `queries/change_detection.sql` on a regular interval (e.g., every 30 seconds).
|
||||
|
||||
```
|
||||
SELECT time_of_last_deploy FROM galaxy;
|
||||
```
|
||||
|
||||
Compare the returned `time_of_last_deploy` to the last known value:
|
||||
- **No change** → do nothing
|
||||
- **Changed** → a deployment occurred; re-run Steps 1 and 2 to rebuild the address space
|
||||
|
||||
This handles objects being deployed, undeployed, added, or removed.
|
||||
|
||||
## Connection Details
|
||||
|
||||
See `connectioninfo.md` for database connection parameters and sqlcmd usage.
|
||||
|
||||
```
|
||||
sqlcmd -S localhost -d ZB -E -Q "YOUR QUERY HERE"
|
||||
```
|
||||
|
||||
## Query Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `queries/hierarchy.sql` | Deployed object hierarchy with browse names and parent relationships |
|
||||
| `queries/attributes.sql` | User-defined attributes with data types and array dimensions |
|
||||
| `queries/attributes_extended.sql` | All attributes (system + user-defined) with data types and array dimensions |
|
||||
| `queries/change_detection.sql` | Poll galaxy.time_of_last_deploy for deployment changes |
|
||||
@@ -1,26 +0,0 @@
|
||||
# Galaxy Repository — Connection Information
|
||||
|
||||
## Database Connection
|
||||
|
||||
| Parameter | Value |
|
||||
|-----------------|----------------|
|
||||
| Server | localhost (default instance) |
|
||||
| Database Name | ZB |
|
||||
| Port | 1433 (default) |
|
||||
| Authentication | Windows Auth |
|
||||
| Username | dohertj2 |
|
||||
|
||||
## sqlcmd Usage
|
||||
|
||||
```
|
||||
sqlcmd -S localhost -d ZB -E -Q "YOUR QUERY HERE"
|
||||
```
|
||||
|
||||
- `-S localhost` — default instance
|
||||
- `-d ZB` — database name
|
||||
- `-E` — Windows Authentication (dohertj2)
|
||||
|
||||
## Notes
|
||||
|
||||
- The Galaxy Repository is a SQL Server database created and managed by AVEVA System Platform (formerly Wonderware).
|
||||
- Typically accessed via SQL Server Management Studio (SSMS), `sqlcmd`, or programmatically via ODBC/ADO.NET/pyodbc.
|
||||
@@ -1,96 +0,0 @@
|
||||
# Data Type Mapping — Galaxy Repository to OPC UA
|
||||
|
||||
## Scalar Type Mapping
|
||||
|
||||
| mx_data_type | Galaxy Description | OPC UA DataType | OPC UA NodeId | Notes |
|
||||
|--------------|--------------------|-----------------|---------------|-------|
|
||||
| 1 | Boolean | Boolean | i=1 | Direct mapping |
|
||||
| 2 | Integer (Int32) | Int32 | i=6 | Galaxy integers are 32-bit signed |
|
||||
| 3 | Float (Single) | Float | i=10 | 32-bit IEEE 754 |
|
||||
| 4 | Double | Double | i=11 | 64-bit IEEE 754 |
|
||||
| 5 | String | String | i=12 | Unicode string |
|
||||
| 6 | Time (DateTime) | DateTime | i=13 | Galaxy DateTime to OPC UA DateTime (100ns ticks since 1601-01-01) |
|
||||
| 7 | ElapsedTime (TimeSpan) | Double | i=11 | No native OPC UA TimeSpan; map to Double representing seconds (or use Duration type alias, NodeId i=290) |
|
||||
| 8 | (reference) | String | i=12 | Object reference; expose as string representation |
|
||||
| 13 | (enumeration) | Int32 | i=6 | Enum backing value is integer |
|
||||
| 14 | (custom) | String | i=12 | Fallback to string |
|
||||
| 15 | InternationalizedString | LocalizedText | i=21 | OPC UA LocalizedText supports locale + text pairs |
|
||||
| 16 | (custom) | String | i=12 | Fallback to string |
|
||||
|
||||
## OPC UA Built-in Type Reference
|
||||
|
||||
For context, the full set of OPC UA built-in types and their NodeIds:
|
||||
|
||||
| NodeId | Type | Description |
|
||||
|--------|------|-------------|
|
||||
| i=1 | Boolean | True/false |
|
||||
| i=2 | SByte | Signed 8-bit integer |
|
||||
| i=3 | Byte | Unsigned 8-bit integer |
|
||||
| i=4 | Int16 | Signed 16-bit integer |
|
||||
| i=5 | UInt16 | Unsigned 16-bit integer |
|
||||
| i=6 | Int32 | Signed 32-bit integer |
|
||||
| i=7 | UInt32 | Unsigned 32-bit integer |
|
||||
| i=8 | Int64 | Signed 64-bit integer |
|
||||
| i=9 | UInt64 | Unsigned 64-bit integer |
|
||||
| i=10 | Float | 32-bit IEEE 754 |
|
||||
| i=11 | Double | 64-bit IEEE 754 |
|
||||
| i=12 | String | Unicode string |
|
||||
| i=13 | DateTime | Date and time (100ns ticks since 1601-01-01) |
|
||||
| i=14 | Guid | 128-bit globally unique identifier |
|
||||
| i=15 | ByteString | Sequence of bytes |
|
||||
| i=21 | LocalizedText | Locale + text pair |
|
||||
|
||||
## Array Handling
|
||||
|
||||
When `is_array = 1` in the attributes query, the OPC UA variable node must be configured as an array.
|
||||
|
||||
### ValueRank
|
||||
|
||||
Set on the OPC UA variable node to indicate scalar vs array:
|
||||
|
||||
| is_array | ValueRank | Meaning |
|
||||
|----------|-----------|---------|
|
||||
| 0 | -1 (Scalar) | Value is not an array |
|
||||
| 1 | 1 (OneDimension) | Value is a one-dimensional array |
|
||||
|
||||
### ArrayDimensions
|
||||
|
||||
When `ValueRank = 1`, set the `ArrayDimensions` attribute to a single-element array containing the `array_dimension` value from the attributes query.
|
||||
|
||||
Example for `MESReceiver_001.MoveInPartNumbers` (`is_array=1`, `array_dimension=50`):
|
||||
- DataType: String (i=12)
|
||||
- ValueRank: 1
|
||||
- ArrayDimensions: [50]
|
||||
|
||||
Example for `TestMachine_001.MachineID` (`is_array=0`):
|
||||
- DataType: String (i=12)
|
||||
- ValueRank: -1
|
||||
- ArrayDimensions: (not set)
|
||||
|
||||
## Security Classification
|
||||
|
||||
Galaxy attributes have a `security_classification` column that controls the access level required for writes. The attributes query returns this value for each attribute.
|
||||
|
||||
| security_classification | Galaxy Level | OPC UA Access | Description |
|
||||
|-------------------------|--------------|---------------|-------------|
|
||||
| 0 | FreeAccess | ReadWrite | No security restrictions |
|
||||
| 1 | Operate | ReadWrite | Normal operating level (default) |
|
||||
| 2 | SecuredWrite | ReadOnly | Requires elevated write access |
|
||||
| 3 | VerifiedWrite | ReadOnly | Requires verified/confirmed write access |
|
||||
| 4 | Tune | ReadWrite | Tuning-level access |
|
||||
| 5 | Configure | ReadWrite | Configuration-level access |
|
||||
| 6 | ViewOnly | ReadOnly | Read-only, no writes permitted |
|
||||
|
||||
Most attributes default to `Operate` (1). Higher values indicate more restrictive write access. `ViewOnly` (6) attributes should be exposed as read-only in OPC UA (`AccessLevel = CurrentRead` only, no `CurrentWrite`).
|
||||
|
||||
## DateTime Conversion
|
||||
|
||||
Galaxy `Time` (mx_data_type=6) stores DateTime values. OPC UA DateTime is defined as the number of 100-nanosecond intervals since January 1, 1601 (UTC). Ensure the conversion accounts for:
|
||||
- Timezone: Galaxy may store local time; OPC UA expects UTC
|
||||
- Epoch difference: adjust if Galaxy uses a different epoch (e.g., Unix epoch 1970-01-01)
|
||||
|
||||
## ElapsedTime Handling
|
||||
|
||||
Galaxy `ElapsedTime` (mx_data_type=7) represents a duration/timespan. OPC UA has no native TimeSpan type. Options:
|
||||
- **Double (i=11)**: Store as seconds (recommended for simplicity)
|
||||
- **Duration (i=290)**: OPC UA type alias for Double, semantically represents milliseconds — use if the OPC UA SDK supports it
|
||||
@@ -1,13 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
-- Table: CurrentSessionContainedName
|
||||
CREATE TABLE [CurrentSessionContainedName] (
|
||||
[Uniqeid] int NOT NULL,
|
||||
[obj_id] int NULL,
|
||||
[containedname] nvarchar(32) NULL,
|
||||
CONSTRAINT [PK_CurrentSessionContainedName] PRIMARY KEY ([Uniqeid])
|
||||
);
|
||||
GO
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
-- Table: ImportTransaction
|
||||
CREATE TABLE [ImportTransaction] (
|
||||
[ImportOperationId] nvarchar(329) NULL,
|
||||
[Status] bit NOT NULL DEFAULT ((1))
|
||||
);
|
||||
GO
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
-- Table: galaxy_data
|
||||
CREATE TABLE [galaxy_data] (
|
||||
[data_type] nvarchar(256) NOT NULL,
|
||||
[data] image(2147483647) NULL
|
||||
);
|
||||
GO
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
-- Table: gobject_log_details
|
||||
CREATE TABLE [gobject_log_details] (
|
||||
[gobject_id] int NOT NULL,
|
||||
[tag_name] nvarchar(329) NOT NULL
|
||||
);
|
||||
GO
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
-- Table: gobject_protected
|
||||
CREATE TABLE [gobject_protected] (
|
||||
[gobject_id] int NOT NULL
|
||||
);
|
||||
GO
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
-- Table: intouchviewapptemplate_allsymbols
|
||||
CREATE TABLE [intouchviewapptemplate_allsymbols] (
|
||||
[gobject_id] int NOT NULL
|
||||
);
|
||||
GO
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
-- Table: lookup_folder
|
||||
CREATE TABLE [lookup_folder] (
|
||||
[folder_type] smallint NOT NULL,
|
||||
[folder_type_name] nvarchar(32) NULL
|
||||
);
|
||||
GO
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
-- Table: lookup_table_name
|
||||
CREATE TABLE [lookup_table_name] (
|
||||
[table_id] smallint NOT NULL,
|
||||
[table_name] nvarchar(250) NULL
|
||||
);
|
||||
GO
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- Table: namespace
|
||||
CREATE TABLE [namespace] (
|
||||
[namespace_id] smallint NOT NULL,
|
||||
[namespace_name] nvarchar(32) NULL,
|
||||
CONSTRAINT [PK_namespace] PRIMARY KEY ([namespace_id])
|
||||
);
|
||||
GO
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
-- 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user