dialect/sql/schema: add MigrateOption 'WithForeighKeysDisable' (#748)

This commit is contained in:
day-dreams
2020-09-13 01:49:20 +08:00
parent 46df885752
commit 54028de04f
25 changed files with 88 additions and 7 deletions

View File

@@ -35,6 +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
)
// Schema is the API for creating, migrating and dropping a schema.

View File

@@ -35,6 +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
)
// Schema is the API for creating, migrating and dropping a schema.

View File

@@ -35,6 +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
)
// Schema is the API for creating, migrating and dropping a schema.

View File

@@ -35,6 +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
)
// Schema is the API for creating, migrating and dropping a schema.

View File

@@ -35,6 +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
)
// Schema is the API for creating, migrating and dropping a schema.

View File

@@ -35,6 +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
)
// Schema is the API for creating, migrating and dropping a schema.

View File

@@ -35,6 +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
)
// Schema is the API for creating, migrating and dropping a schema.

View File

@@ -35,6 +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
)
// Schema is the API for creating, migrating and dropping a schema.

View File

@@ -35,6 +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
)
// Schema is the API for creating, migrating and dropping a schema.

View File

@@ -35,6 +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
)
// Schema is the API for creating, migrating and dropping a schema.

View File

@@ -35,6 +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
)
// Schema is the API for creating, migrating and dropping a schema.

View File

@@ -35,6 +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
)
// Schema is the API for creating, migrating and dropping a schema.