Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/migrations/v4_to_ControlSystem6.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ In case you used any of these `Create()` functions, please update your code by
using ef core's `DbContext`. As an example for `IActivitiyEntityRepository` the
changes could look like this:

```
```csharp
// before
var activityEntity = uow.GetRepository<IActivityEntityRepository>().Create(activityData.Task.Id, activityData.Resource.Id);
activityEntity.ProcessId = processData.Id;
Expand All @@ -82,7 +82,7 @@ changes could look like this:
ResourceId = activityData.Resource.Id,
ProcessId = processData.Id,
}).Entity;

```

### MORYX Machine Connector
```sql
Expand Down Expand Up @@ -310,8 +310,8 @@ ALTER INDEX "PartLink_IX_ChildId" RENAME TO "IX_PartLinks_ChildId";
ALTER INDEX "PartLink_IX_ParentId" RENAME TO "IX_PartLinks_ParentId";

ALTER TABLE public."ProductFileEntity" RENAME TO "ProductFiles";
ALTER TABLE public."PartLinks" RENAME CONSTRAINT "PK_public.ProductFileEntity" TO "PK_ProductFiles";
ALTER TABLE public."PartLinks" RENAME CONSTRAINT "FK_public.ProductFileEntity_public.ProductTypeEntity_Product_Id" TO "FK_ProductFiles_ProductTypes_ProductId";
ALTER TABLE public."ProductFiles" RENAME CONSTRAINT "PK_public.ProductFileEntity" TO "PK_ProductFiles";
ALTER TABLE public."ProductFiles" RENAME CONSTRAINT "FK_public.ProductFileEntity_public.ProductTypeEntity_Product_Id" TO "FK_ProductFiles_ProductTypes_ProductId";
ALTER INDEX "ProductFileEntity_IX_Product_Id" RENAME TO "IX_ProductFiles_ProductId";

ALTER TABLE public."ProductInstanceEntity" RENAME TO "ProductInstances";
Expand Down Expand Up @@ -346,8 +346,8 @@ ALTER TABLE public."StepEntity" RENAME TO "WorkplanSteps";
ALTER TABLE public."WorkplanSteps" RENAME CONSTRAINT "PK_public.StepEntity" TO "PK_WorkplanSteps";
ALTER TABLE public."WorkplanSteps" RENAME CONSTRAINT "FK_public.StepEntity_public.WorkplanEntity_SubWorkplanId" TO "FK_WorkplanSteps_Workplans_SubWorkplanId";
ALTER TABLE public."WorkplanSteps" RENAME CONSTRAINT "FK_public.StepEntity_public.WorkplanEntity_WorkplanId" TO "FK_WorkplanSteps_Workplans_WorkplanId";
ALTER INDEX "ProductTypeEntity_IX_CurrentVersionId" RENAME TO "IX_WorkplanSteps_WorkplanId";
ALTER INDEX "ProductTypeEntity_Identifier_Revision_Index" RENAME TO "IX_WorkplanSteps_SubWorkplanId";
ALTER INDEX "StepEntity_IX_WorkplanId" RENAME TO "IX_WorkplanSteps_WorkplanId";
ALTER INDEX "StepEntity_IX_SubWorkplanId" RENAME TO "IX_WorkplanSteps_SubWorkplanId";
ALTER TABLE public."WorkplanSteps" ADD COLUMN "PositionX" float8 NOT NULL;
ALTER TABLE public."WorkplanSteps" ADD COLUMN "PositionY" float8 NOT NULL;

Expand All @@ -369,7 +369,7 @@ CREATE TABLE public."__EFMigrationsHistory" (
);
ALTER TABLE public."__EFMigrationsHistory" OWNER TO postgres;
INSERT INTO public."__EFMigrationsHistory"("MigrationId", "ProductVersion")
VALUES ('20211104134724_InitialCreate', '3.1.0');
VALUES ('20220906133824_InitialCreate', '8.0.12');
ALTER TABLE ONLY public."__EFMigrationsHistory"
ADD CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId");

Expand Down
63 changes: 50 additions & 13 deletions docs/migrations/v8_to_v10.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,9 @@ The analytics module was doing nothing and the web module was replaced by suppor
### Module Orders

- Removed report from interrupt of an operation. Reporting during an interruption doesn't add any value. The quantity for the report can only be predicted and will be inaccurate if something goes wrong or is reworked during the interruption.
- Facade Renaming:
- `GetOperationAsync` -> `LoadOperationAsync`
- `void InterruptOperation(Operation operation, OperationReport report);` -> `Task InterruptOperationAsync(Operation operation, User user, CancellationToken cancellationToken = default);`
- `event EventHandler<OperationReportEventArgs> OperationInterrupted;` -> `event EventHandler<OperationChangedEventArgs> OperationInterrupted;`
- Allowing more changes on a created operation before starting it.
- `SetOperationSortOrder` and `UpdateSource` were combined to `UpdateOperationAsync`. It supports both functionalities and included changing `PlannedStart` and `PlannedEnd` as well.

#### Async Lifecycle Support for OrderManagement
Expand Down Expand Up @@ -460,7 +461,7 @@ Additionally, the APIs of these components have been updated to return `Task` or

**`IOrderManagement`-facade:**

- `Operation GetOperation` -> `Task<Operation> GetOperationAsync`
- `Operation GetOperation` -> `Task<Operation> LoadOperationAsync`
- `Operation AddOperation` -> `Task<Operation> AddOperationAsync`
- `void BeginOperation` -> `Task BeginOperationAsync`
- `void AbortOperation` -> `Task AbortOperationAsync`
Expand Down Expand Up @@ -516,6 +517,7 @@ Additionally, the APIs of these components have been updated to return `Task` or
- The initializers are registered transient by default.
- It is subject to the [#async-life-cycle](#async-life-cycle) changes.
- Introduced `ResourceInitializerResult` object for extensibility and option to save
- A `ComponentNotFoundException` is thrown now, if an initializer is configured in the `Moryx.Resources.Management.ModuleConfig.json` but not found in the assembly load context. Check your configuration in this case.

<details>
<summary> Code Replacement Snippets </summary>
Expand Down Expand Up @@ -691,22 +693,57 @@ This is part of the unification of the general [data model changes](#data-model-

Bugfixes:

* The change in ConnectingToBrokerState prevents an application crash that were not uncommon during debugging
- The change in ConnectingToBrokerState prevents an application crash that were not uncommon during debugging

Cleanup:

* Mostly typos in the string resources or non equal punctuation
* Don't use the obsolete Payload Method and use ReadOnlySequence instead. To avoid unnecessary array copies methods deserializing the data have breaking signature changes
* Remove Newtonoft.Json in favor of System.Text.Json
- Mostly typos in the string resources or non equal punctuation
- Don't use the obsolete Payload Method and use ReadOnlySequence instead. To avoid unnecessary array copies methods deserializing the data have breaking signature changes
<details>
<summary> Code Replacement Snippets </summary>

```csharp
Deserialize(byte[] messageAsBytes) // replace with
Deserialize(ReadOnlySequence<byte> messageAsBytes)
```
</details>
- Remove Newtonoft.Json in favor of System.Text.Json
- Move namespace `Moryx.Drivers.Mqtt.MqttTopics` to `Moryx.Drivers.Mqtt.Topics`

Features:

* Add the option to add custom topics as the User by removing internal access modifiers from MqttTopic Serialize and Deserialize
* Add Retain information for Publishing and Receiving messages
* Support Mqtt5 response topics
* Support unsubscribing from Topics, by removing or changing the resource
* Support changing the broker without restarting the Resource Management, by a) providing a Reconnect method and b) handling changes to the relevant properties
* Support diagnostic tracing of message contents, before and after deserialization
- Add the option to add custom topics as the User by removing internal access modifiers from MqttTopic Serialize and Deserialize
- Add Retain information for Publishing and Receiving messages
- Support Mqtt5 response topics
- Support unsubscribing from Topics, by removing or changing the resource
- Support changing the broker without restarting the Resource Management, by a) providing a Reconnect method and b) handling changes to the relevant properties
- Support diagnostic tracing of message contents, before and after deserialization

#### Required SQL Update:

````sql
// SQLite
UPDATE Resources
SET "Type" = 'Moryx.Drivers.Mqtt.Topics.MqttTopicIByteSerializable'
WHERE "Type" = 'Moryx.Drivers.Mqtt.MqttTopics.MqttTopicIByteSerializable';
UPDATE Resources
SET "Type" = 'Moryx.Drivers.Mqtt.Topics.MqttTopicJson'
WHERE "Type" = 'Moryx.Drivers.Mqtt.MqttTopics.MqttTopicJson';
UPDATE Resources
SET "Type" = 'Moryx.Drivers.Mqtt.Topics.MqttTopicPrimitive'
WHERE "Type" = 'Moryx.Drivers.Mqtt.MqttTopics.MqttTopicPrimitive';

// PostgreSQL
UPDATE public."Resources"
SET "Type" = 'Moryx.Drivers.Mqtt.Topics.MqttTopicIByteSerializable '
WHERE "Type" = 'Moryx.Drivers.Mqtt.MqttTopics.MqttTopicIByteSerializable ';
UPDATE public."Resources"
SET "Type" = 'Moryx.Drivers.Mqtt.Topics.MqttTopicJson'
WHERE "Type" = 'Moryx.Drivers.Mqtt.MqttTopics.MqttTopicJson';
UPDATE public."Resources"
SET "Type" = 'Moryx.Drivers.Mqtt.Topics.MqttTopicPrimitive'
WHERE "Type" = 'Moryx.Drivers.Mqtt.MqttTopics.MqttTopicPrimitive';
````

### OPC-UA Driver`

Expand Down
Loading