mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: move schema/snapshot template to its feature-flag (#1211)
This commit is contained in:
@@ -39,6 +39,12 @@ var (
|
||||
Stage: Experimental,
|
||||
Default: false,
|
||||
Description: "Schema snapshot stores a snapshot of ent/schema and auto-solve merge-conflict (issue #852)",
|
||||
GraphTemplates: []GraphTemplate{
|
||||
{
|
||||
Name: "internal/schema",
|
||||
Format: "internal/schema.go",
|
||||
},
|
||||
},
|
||||
cleanup: func(c *Config) error {
|
||||
return remove(filepath.Join(c.Target, "internal"), "schema.go")
|
||||
},
|
||||
|
||||
@@ -155,13 +155,6 @@ var (
|
||||
Name: "runtime/pkg",
|
||||
Format: "runtime/runtime.go",
|
||||
},
|
||||
{
|
||||
Name: "internal/schema",
|
||||
Format: "internal/schema.go",
|
||||
Skip: func(g *Graph) bool {
|
||||
return !g.featureEnabled(FeatureSnapshot)
|
||||
},
|
||||
},
|
||||
}
|
||||
// patterns for extending partial-templates (included by other templates).
|
||||
partialPatterns = [...]string{
|
||||
|
||||
Reference in New Issue
Block a user