dialect/sql/schema: use withForeighKeys() instead of withForeighKeysDisable(), and add unit tests () (#748)

This commit is contained in:
day-dreams
2020-09-20 16:49:47 +08:00
parent 54028de04f
commit 4582ed0f2a
59 changed files with 239 additions and 9641 deletions

View File

@@ -35,9 +35,9 @@ var (
// WithFixture sets the foreign-key renaming option to the migration when upgrading
// ent from v0.1.0 (issue-#285). Defaults to true.
WithFixture = schema.WithFixture
// WithForeighKeysDisable disables creating foreigh-key in ddl. In some case we are
// not allowed to use foreigh-key. Defaults to false
WithForeighKeysDisable = schema.WithForeighKeysDisable
// WithForeighKeys enables creating foreigh-key in ddl. In some case we are
// not allowed to use foreigh-key. Defaults to true
WithForeighKeys = schema.WithForeighKeys
)
// Schema is the API for creating, migrating and dropping a schema.