diff --git a/docs/cookbook/migrate-to-composite-field.md b/docs/cookbook/migrate-to-composite-field.md index dd9b2ea2a3525b72a3023fcd20ef14dc64aabdb6..b2375ab8bba7122bbc43dd3240d4f1980a7cfecb 100644 --- a/docs/cookbook/migrate-to-composite-field.md +++ b/docs/cookbook/migrate-to-composite-field.md @@ -2,7 +2,7 @@ Sometimes you start with table containing values, which you then see have dependency on each other. As happened with [Stamp object](https://gitlab.grifart.cz/ivy/server/-/merge_requests/222/diffs#note_69354) (originally named `auditTrail`). -##Â 1. migrating database +### 1. migrating database ```sql -- prepare new data type in PostgreSQL @@ -27,6 +27,8 @@ ALTER TABLE "clinic"."patient" DROP COLUMN "createdBy"; ``` +###Â 2. Mapper + And add mapping of new field. It is useful to use PostgreSQL tools for composite &Â array types. This helper class will provide you logic for (de)serializing these composite types into standard SQL query. ```php @@ -49,4 +51,4 @@ And add mapping of new field. It is useful to use PostgreSQL tools for composite ); }, ); -``` \ No newline at end of file +```