8000 Update migrate.md by a8m · Pull Request #2798 · ent/ent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update migrate.md #2798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2022
Merged
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
10 changes: 3 additions & 7 deletions doc/md/migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,8 @@ the object ID to be unique.
To enable the Universal-IDs support for your project, pass the `WithGlobalUniqueID` option to the migration.

:::note
Be aware, that `WithGlobalUniqueID` and [versioned migration](versioned-migrations.md) files are not working together.
When using `WithGlobalUniqueID`, the allocated ranges are computed dynamically when creating the diff between a deployed
database and the current schema. In cases where multiple deployments exist, the allocated ranges for the same type might
be different from each other, depending on when the deployment took part. If you only have one deployment or all
deployments have the exact same data in the `ent_types` table, you can use `WithUniversalID` instead. This will enable a
file based type range store instead of a database-table as source of truth.
Versioned-migration users should follow [the documentation](versioned-migrations.md#a-word-on-global-unique-ids)
when using `WithGlobalUniqueID` on MySQL 5.*.
:::

```go
Expand Down Expand Up @@ -487,4 +483,4 @@ func fillNulls(next schema.Applier) schema.Applier {
return next.Apply(ctx, conn, plan)
})
}
```
```
0