entc/gen: add sql/schemaconfig feature flag (#1194)

This commit is contained in:
Marwan Sulaiman
2021-01-20 04:43:57 -05:00
committed by GitHub
parent 0c2c45f0c6
commit 59ffee504d

View File

@@ -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 = []Feature{
FeaturePrivacy,
FeatureEntQL,
FeatureSnapshot,
FeatureCustomSchemas,
}
)