mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: add sql/schemaconfig feature flag (#1194)
This commit is contained in:
@@ -43,11 +43,25 @@ var (
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FeatureCustomSchemas allows users to pass init time alternate schema names
|
||||||
|
// for each ent model. This is useful if your SQL tables are spread out against
|
||||||
|
// multiple databases.
|
||||||
|
FeatureCustomSchemas = Feature{
|
||||||
|
Name: "sql/schemaconfig",
|
||||||
|
Stage: Experimental,
|
||||||
|
Default: false,
|
||||||
|
Description: "Allows alternate schema names for each ent model. Useful if SQL tables are spread out against multiple databases",
|
||||||
|
cleanup: func(c *Config) error {
|
||||||
|
return os.RemoveAll(filepath.Join(c.Target, "internal"))
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
// AllFeatures holds a list of all feature-flags.
|
// AllFeatures holds a list of all feature-flags.
|
||||||
AllFeatures = []Feature{
|
AllFeatures = []Feature{
|
||||||
FeaturePrivacy,
|
FeaturePrivacy,
|
||||||
FeatureEntQL,
|
FeatureEntQL,
|
||||||
FeatureSnapshot,
|
FeatureSnapshot,
|
||||||
|
FeatureCustomSchemas,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user