Sfoglia il codice sorgente

Update migration note

Michael Bromley 2 anni fa
parent
commit
d525429b2c
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      CHANGELOG_NEXT.md

+ 1 - 1
CHANGELOG_NEXT.md

@@ -23,7 +23,7 @@ the new `Province` entity. The `Zone.members` property is now an array of `Regio
 `Country`, since Zones may now be composed of both countries and provinces. If you have defined
 any custom fields on `Country`, you'll need to change it to `Region` in your custom fields config.
 
-   If you are updating from beta.0, you'll need to generate a migration and then add the following lines (this is postgres syntax, swap backticks for double-quotes for mysql):
+   If you are updating from beta.0, you'll need to generate a migration and then add the following lines **before any generated `ADD CONSTRAINT` statements** (this is postgres syntax, swap backticks for double-quotes for mysql):
    ```ts
    await queryRunner.query(`INSERT INTO "region" ("createdAt", "updatedAt", "code", "type", "enabled", "id", "discriminator") 
                                            SELECT "createdAt", "updatedAt", "code", 'country', "enabled", "id", 'Country' FROM "country"`, undefined);