mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
Summary:
Migration incorrectly generated field default value on storage key inclusion.
Example Field:
```
field.String("tenant").
StorageKey("organization").
Default("fb-test"),
```
Generated default of:
```
// DefaultTenant holds the default value on creation for the tenant field.
DefaultTenant = descTenant.Default.(string)
```
But migration references non existent default (storage key is used):
```
{Name: "organization", Type: field.TypeString, Default: user.DefaultOrganization},
```
Reviewed By: a8m
Differential Revision: D17578898
fbshipit-source-id: afca92ac3f34c16100c868a10d0a480139bf4262