Skip to content

Commit

Permalink
New Crowdin updates (#778)
Browse files Browse the repository at this point in the history
* New translations advanced_query.md (Korean)

* New translations advanced_query.md (Portuguese, Brazilian)

* New translations create.md (Chinese Simplified)

* New translations session.md (Japanese)

* New translations advanced_query.md (Chinese Simplified)

* New translations associations.md (Chinese Simplified)

* New translations method_chaining.md (Chinese Simplified)

* New translations update.md (Chinese Simplified)

* New translations update.md (Chinese Simplified)

* New translations associations.md (Chinese Simplified)

* New translations associations.md (Chinese Simplified)

* New translations create.md (Chinese Simplified)

* New translations database_to_structs.md (Chinese Simplified)

* New translations database_to_structs.md (French)

* New translations database_to_structs.md (Spanish)

* New translations database_to_structs.md (Arabic)

* New translations database_to_structs.md (German)

* New translations database_to_structs.md (Italian)

* New translations database_to_structs.md (Japanese)

* New translations database_to_structs.md (Korean)

* New translations database_to_structs.md (Polish)

* New translations database_to_structs.md (Russian)

* New translations database_to_structs.md (Turkish)

* New translations database_to_structs.md (Portuguese, Brazilian)

* New translations database_to_structs.md (Indonesian)

* New translations database_to_structs.md (Persian)

* New translations database_to_structs.md (Azerbaijani)

* New translations database_to_structs.md (Hindi)

* Update source file database_to_structs.md

* New translations community.md (Chinese Simplified)

* New translations migration.md (Chinese Simplified)

* New translations clause.md (Chinese Simplified)

* New translations community.md (French)

* New translations migration.md (French)

* New translations clause.md (French)

* New translations community.md (Spanish)

* New translations migration.md (Spanish)

* New translations clause.md (Spanish)

* New translations community.md (Arabic)

* New translations migration.md (Arabic)

* New translations clause.md (Arabic)

* New translations community.md (German)

* New translations migration.md (German)

* New translations clause.md (German)

* New translations community.md (Italian)

* New translations migration.md (Italian)

* New translations clause.md (Italian)

* New translations community.md (Japanese)

* New translations migration.md (Japanese)

* New translations clause.md (Japanese)

* New translations community.md (Korean)

* New translations migration.md (Korean)

* New translations clause.md (Korean)

* New translations community.md (Polish)

* New translations migration.md (Polish)

* New translations clause.md (Polish)

* New translations community.md (Russian)

* New translations migration.md (Russian)

* New translations clause.md (Russian)

* New translations community.md (Turkish)

* New translations migration.md (Turkish)

* New translations clause.md (Turkish)

* New translations community.md (Portuguese, Brazilian)

* New translations migration.md (Portuguese, Brazilian)

* New translations clause.md (Portuguese, Brazilian)

* New translations community.md (Indonesian)

* New translations migration.md (Indonesian)

* New translations clause.md (Indonesian)

* New translations community.md (Persian)

* New translations migration.md (Persian)

* New translations clause.md (Persian)

* New translations community.md (Azerbaijani)

* New translations migration.md (Azerbaijani)

* New translations clause.md (Azerbaijani)

* New translations community.md (Hindi)

* New translations migration.md (Hindi)

* New translations clause.md (Hindi)

* Update source file community.md

* Update source file migration.md

* Update source file clause.md
  • Loading branch information
jinzhu authored Sep 14, 2024
1 parent 8facb9c commit d797c7b
Show file tree
Hide file tree
Showing 72 changed files with 283 additions and 93 deletions.
1 change: 1 addition & 0 deletions pages/ar_SA/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ layout: page
* [oracle - GORM Oracle driver](https://github.com/CengSin/oracle)
* [Go ORM Helper - GORM Code Completion Goland Plugin](https://github.com/maiqingqiang/go-orm-helper)
* [dynmgrm - GORM DynamoDB Driver](https://github.com/miyamo2/dynmgrm)
* [immugorm - GORM immudb driver](https://github.com/codenotary/immugorm)

## <span id="contribute">Contribute to this page</span>

Expand Down
4 changes: 2 additions & 2 deletions pages/ar_SA/docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ layout: page
Automatically migrate your schema, to keep your schema up to date.

{% note warn %}
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision, nullable changed. It **WON'T** delete unused columns to protect your data.
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision changed, or if it's changing from non-nullable to nullable. It **WON'T** delete unused columns to protect your data.
{% endnote %}

```go
Expand Down Expand Up @@ -268,7 +268,7 @@ GORM creates constraints when auto migrating or creating table, see [Constraints

[Atlas](https://atlasgo.io) is an open-source database migration tool that has an official integration with GORM.

While GORM's `AutoMigrate` feature works in most cases, at some point you many need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.
While GORM's `AutoMigrate` feature works in most cases, at some point you may need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.

Once this happens, the responsibility for planning migration scripts and making sure they are in line with what GORM expects at runtime is moved to developers.

Expand Down
2 changes: 1 addition & 1 deletion pages/ar_SA/gen/clause.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ u := query.User

user := model.User{Name: "Modi", Age: 18, Birthday: time.Now()}

u.Save(&mode)
u.Save(&model)
// equal to
u.Clauses(clause.OnConflict{UpdateAll: true}).Create(value).Error
```
Expand Down
11 changes: 11 additions & 0 deletions pages/ar_SA/gen/database_to_structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@ WithImportPkgPath(paths ...string)
// WithOpts specify global model options
WithOpts(opts ...ModelOpt)
```
### Ignore Table
By `WithTableNameStrategy`, you can ignore some tables that do not need to be generated, such as tables starting with `_`.

```go
g.WithTableNameStrategy(func(tableName string) (targetTableName string) {
if strings.HasPrefix(tableName, "_") { //Just return an empty string and the table will be ignored.
return ""
}
return tableName
})
```

### Data Mapping

Expand Down
1 change: 1 addition & 0 deletions pages/az_AZ/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ layout: page
* [oracle - GORM Oracle driver](https://github.com/CengSin/oracle)
* [Go ORM Helper - GORM Code Completion Goland Plugin](https://github.com/maiqingqiang/go-orm-helper)
* [dynmgrm - GORM DynamoDB Driver](https://github.com/miyamo2/dynmgrm)
* [immugorm - GORM immudb driver](https://github.com/codenotary/immugorm)

## <span id="contribute">Contribute to this page</span>

Expand Down
4 changes: 2 additions & 2 deletions pages/az_AZ/docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ layout: page
Automatically migrate your schema, to keep your schema up to date.

{% note warn %}
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision, nullable changed. It **WON'T** delete unused columns to protect your data.
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision changed, or if it's changing from non-nullable to nullable. It **WON'T** delete unused columns to protect your data.
{% endnote %}

```go
Expand Down Expand Up @@ -269,7 +269,7 @@ GORM creates constraints when auto migrating or creating table, see [Constraints

[Atlas](https://atlasgo.io) is an open-source database migration tool that has an official integration with GORM.

While GORM's `AutoMigrate` feature works in most cases, at some point you many need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.
While GORM's `AutoMigrate` feature works in most cases, at some point you may need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.

Once this happens, the responsibility for planning migration scripts and making sure they are in line with what GORM expects at runtime is moved to developers.

Expand Down
2 changes: 1 addition & 1 deletion pages/az_AZ/gen/clause.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ u := query.User

user := model.User{Name: "Modi", Age: 18, Birthday: time.Now()}

u.Save(&mode)
u.Save(&model)
// equal to
u.Clauses(clause.OnConflict{UpdateAll: true}).Create(value).Error
```
Expand Down
11 changes: 11 additions & 0 deletions pages/az_AZ/gen/database_to_structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@ WithImportPkgPath(paths ...string)
// WithOpts specify global model options
WithOpts(opts ...ModelOpt)
```
### Ignore Table
By `WithTableNameStrategy`, you can ignore some tables that do not need to be generated, such as tables starting with `_`.

```go
g.WithTableNameStrategy(func(tableName string) (targetTableName string) {
if strings.HasPrefix(tableName, "_") { //Just return an empty string and the table will be ignored.
return ""
}
return tableName
})
```

### Data Mapping

Expand Down
1 change: 1 addition & 0 deletions pages/de_DE/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ layout: page
* [oracle - GORM Oracle driver](https://github.com/CengSin/oracle)
* [Go ORM Helper - GORM Code Completion Goland Plugin](https://github.com/maiqingqiang/go-orm-helper)
* [dynmgrm - GORM DynamoDB Driver](https://github.com/miyamo2/dynmgrm)
* [immugorm - GORM immudb driver](https://github.com/codenotary/immugorm)

## <span id="contribute">Trage zu dieser Seite bei</span>

Expand Down
4 changes: 2 additions & 2 deletions pages/de_DE/docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ layout: page
Automatically migrate your schema, to keep your schema up to date.

{% note warn %}
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision, nullable changed. It **WON'T** delete unused columns to protect your data.
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision changed, or if it's changing from non-nullable to nullable. It **WON'T** delete unused columns to protect your data.
{% endnote %}

```go
Expand Down Expand Up @@ -269,7 +269,7 @@ GORM creates constraints when auto migrating or creating table, see [Constraints

[Atlas](https://atlasgo.io) is an open-source database migration tool that has an official integration with GORM.

While GORM's `AutoMigrate` feature works in most cases, at some point you many need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.
While GORM's `AutoMigrate` feature works in most cases, at some point you may need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.

Once this happens, the responsibility for planning migration scripts and making sure they are in line with what GORM expects at runtime is moved to developers.

Expand Down
2 changes: 1 addition & 1 deletion pages/de_DE/gen/clause.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ u := query.User

user := model.User{Name: "Modi", Age: 18, Birthday: time.Now()}

u.Save(&mode)
u.Save(&model)
// equal to
u.Clauses(clause.OnConflict{UpdateAll: true}).Create(value).Error
```
Expand Down
11 changes: 11 additions & 0 deletions pages/de_DE/gen/database_to_structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@ WithImportPkgPath(paths ...string)
// WithOpts specify global model options
WithOpts(opts ...ModelOpt)
```
### Ignore Table
By `WithTableNameStrategy`, you can ignore some tables that do not need to be generated, such as tables starting with `_`.

```go
g.WithTableNameStrategy(func(tableName string) (targetTableName string) {
if strings.HasPrefix(tableName, "_") { //Just return an empty string and the table will be ignored.
return ""
}
return tableName
})
```

### Data Mapping

Expand Down
1 change: 1 addition & 0 deletions pages/es_ES/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ layout: page
* [oracle - GORM Oracle driver](https://github.com/CengSin/oracle)
* [Go ORM Helper - GORM Code Completion Goland Plugin](https://github.com/maiqingqiang/go-orm-helper)
* [dynmgrm - GORM DynamoDB Driver](https://github.com/miyamo2/dynmgrm)
* [immugorm - GORM immudb driver](https://github.com/codenotary/immugorm)

## <span id="contribute">Contribuye a esta página</span>

Expand Down
4 changes: 2 additions & 2 deletions pages/es_ES/docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ layout: page
Automatically migrate your schema, to keep your schema up to date.

{% note warn %}
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision, nullable changed. It **WON'T** delete unused columns to protect your data.
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision changed, or if it's changing from non-nullable to nullable. It **WON'T** delete unused columns to protect your data.
{% endnote %}

```go
Expand Down Expand Up @@ -269,7 +269,7 @@ GORM creates constraints when auto migrating or creating table, see [Constraints

[Atlas](https://atlasgo.io) is an open-source database migration tool that has an official integration with GORM.

While GORM's `AutoMigrate` feature works in most cases, at some point you many need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.
While GORM's `AutoMigrate` feature works in most cases, at some point you may need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.

Once this happens, the responsibility for planning migration scripts and making sure they are in line with what GORM expects at runtime is moved to developers.

Expand Down
2 changes: 1 addition & 1 deletion pages/es_ES/gen/clause.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ u := query.User

user := model.User{Name: "Modi", Age: 18, Birthday: time.Now()}

u.Save(&mode)
u.Save(&model)
// equal to
u.Clauses(clause.OnConflict{UpdateAll: true}).Create(value).Error
```
Expand Down
11 changes: 11 additions & 0 deletions pages/es_ES/gen/database_to_structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@ WithImportPkgPath(paths ...string)
// WithOpts specify global model options
WithOpts(opts ...ModelOpt)
```
### Ignore Table
By `WithTableNameStrategy`, you can ignore some tables that do not need to be generated, such as tables starting with `_`.

```go
g.WithTableNameStrategy(func(tableName string) (targetTableName string) {
if strings.HasPrefix(tableName, "_") { //Just return an empty string and the table will be ignored.
return ""
}
return tableName
})
```

### Data Mapping

Expand Down
1 change: 1 addition & 0 deletions pages/fa_IR/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ layout: صفحه
* [oracle - GORM Oracle driver](https://github.com/CengSin/oracle)
* [Go ORM Helper - GORM Code Completion Goland Plugin](https://github.com/maiqingqiang/go-orm-helper)
* [dynmgrm - GORM DynamoDB Driver](https://github.com/miyamo2/dynmgrm)
* [immugorm - GORM immudb driver](https://github.com/codenotary/immugorm)

## <span id="contribute">مشارکت در بهبود این صفحه</span>

Expand Down
4 changes: 2 additions & 2 deletions pages/fa_IR/docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ layout: page
Automatically migrate your schema, to keep your schema up to date.

{% note warn %}
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision, nullable changed. It **WON'T** delete unused columns to protect your data.
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision changed, or if it's changing from non-nullable to nullable. It **WON'T** delete unused columns to protect your data.
{% endnote %}

```go
Expand Down Expand Up @@ -269,7 +269,7 @@ GORM creates constraints when auto migrating or creating table, see [Constraints

[Atlas](https://atlasgo.io) is an open-source database migration tool that has an official integration with GORM.

While GORM's `AutoMigrate` feature works in most cases, at some point you many need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.
While GORM's `AutoMigrate` feature works in most cases, at some point you may need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.

Once this happens, the responsibility for planning migration scripts and making sure they are in line with what GORM expects at runtime is moved to developers.

Expand Down
2 changes: 1 addition & 1 deletion pages/fa_IR/gen/clause.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ u := query.User

user := model.User{Name: "Modi", Age: 18, Birthday: time.Now()}

u.Save(&mode)
u.Save(&model)
// equal to
u.Clauses(clause.OnConflict{UpdateAll: true}).Create(value).Error
```
Expand Down
11 changes: 11 additions & 0 deletions pages/fa_IR/gen/database_to_structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@ WithImportPkgPath(paths ...string)
// WithOpts specify global model options
WithOpts(opts ...ModelOpt)
```
### Ignore Table
By `WithTableNameStrategy`, you can ignore some tables that do not need to be generated, such as tables starting with `_`.

```go
g.WithTableNameStrategy(func(tableName string) (targetTableName string) {
if strings.HasPrefix(tableName, "_") { //Just return an empty string and the table will be ignored.
return ""
}
return tableName
})
```

### Data Mapping

Expand Down
1 change: 1 addition & 0 deletions pages/fr_FR/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ layout: page
* [oracle - GORM Oracle driver](https://github.com/CengSin/oracle)
* [Go ORM Helper - GORM Code Completion Goland Plugin](https://github.com/maiqingqiang/go-orm-helper)
* [dynmgrm - GORM DynamoDB Driver](https://github.com/miyamo2/dynmgrm)
* [immugorm - GORM immudb driver](https://github.com/codenotary/immugorm)

## <span id="contribute">Contribute to this page</span>

Expand Down
4 changes: 2 additions & 2 deletions pages/fr_FR/docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ layout: page
Automatically migrate your schema, to keep your schema up to date.

{% note warn %}
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision, nullable changed. It **WON'T** delete unused columns to protect your data.
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision changed, or if it's changing from non-nullable to nullable. It **WON'T** delete unused columns to protect your data.
{% endnote %}

```go
Expand Down Expand Up @@ -269,7 +269,7 @@ GORM creates constraints when auto migrating or creating table, see [Constraints

[Atlas](https://atlasgo.io) is an open-source database migration tool that has an official integration with GORM.

While GORM's `AutoMigrate` feature works in most cases, at some point you many need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.
While GORM's `AutoMigrate` feature works in most cases, at some point you may need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.

Once this happens, the responsibility for planning migration scripts and making sure they are in line with what GORM expects at runtime is moved to developers.

Expand Down
2 changes: 1 addition & 1 deletion pages/fr_FR/gen/clause.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ u := query.User

user := model.User{Name: "Modi", Age: 18, Birthday: time.Now()}

u.Save(&mode)
u.Save(&model)
// equal to
u.Clauses(clause.OnConflict{UpdateAll: true}).Create(value).Error
```
Expand Down
11 changes: 11 additions & 0 deletions pages/fr_FR/gen/database_to_structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@ WithImportPkgPath(paths ...string)
// WithOpts specify global model options
WithOpts(opts ...ModelOpt)
```
### Ignore Table
By `WithTableNameStrategy`, you can ignore some tables that do not need to be generated, such as tables starting with `_`.

```go
g.WithTableNameStrategy(func(tableName string) (targetTableName string) {
if strings.HasPrefix(tableName, "_") { //Just return an empty string and the table will be ignored.
return ""
}
return tableName
})
```

### Data Mapping

Expand Down
1 change: 1 addition & 0 deletions pages/hi_IN/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ layout: पृष्ठ
* [oracle - GORM Oracle driver](https://github.com/CengSin/oracle)
* [Go ORM Helper - GORM Code Completion Goland Plugin](https://github.com/maiqingqiang/go-orm-helper)
* [dynmgrm - GORM DynamoDB Driver](https://github.com/miyamo2/dynmgrm)
* [immugorm - GORM immudb driver](https://github.com/codenotary/immugorm)

## <span id="contribute">Contribute to this page</span>

Expand Down
4 changes: 2 additions & 2 deletions pages/hi_IN/docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ layout: page
Automatically migrate your schema, to keep your schema up to date.

{% note warn %}
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision, nullable changed. It **WON'T** delete unused columns to protect your data.
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision changed, or if it's changing from non-nullable to nullable. It **WON'T** delete unused columns to protect your data.
{% endnote %}

```go
Expand Down Expand Up @@ -269,7 +269,7 @@ GORM creates constraints when auto migrating or creating table, see [Constraints

[Atlas](https://atlasgo.io) is an open-source database migration tool that has an official integration with GORM.

While GORM's `AutoMigrate` feature works in most cases, at some point you many need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.
While GORM's `AutoMigrate` feature works in most cases, at some point you may need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.

Once this happens, the responsibility for planning migration scripts and making sure they are in line with what GORM expects at runtime is moved to developers.

Expand Down
2 changes: 1 addition & 1 deletion pages/hi_IN/gen/clause.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ u := query.User

user := model.User{Name: "Modi", Age: 18, Birthday: time.Now()}

u.Save(&mode)
u.Save(&model)
// equal to
u.Clauses(clause.OnConflict{UpdateAll: true}).Create(value).Error
```
Expand Down
11 changes: 11 additions & 0 deletions pages/hi_IN/gen/database_to_structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@ WithImportPkgPath(paths ...string)
// WithOpts specify global model options
WithOpts(opts ...ModelOpt)
```
### Ignore Table
By `WithTableNameStrategy`, you can ignore some tables that do not need to be generated, such as tables starting with `_`.

```go
g.WithTableNameStrategy(func(tableName string) (targetTableName string) {
if strings.HasPrefix(tableName, "_") { //Just return an empty string and the table will be ignored.
return ""
}
return tableName
})
```

### Data Mapping

Expand Down
1 change: 1 addition & 0 deletions pages/id_ID/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ layout: page
* [oracle - GORM Oracle driver](https://github.com/CengSin/oracle)
* [Go ORM Helper - GORM Code Completion Goland Plugin](https://github.com/maiqingqiang/go-orm-helper)
* [dynmgrm - GORM DynamoDB Driver](https://github.com/miyamo2/dynmgrm)
* [immugorm - GORM immudb driver](https://github.com/codenotary/immugorm)

## <span id="contribute">Kontirbusi ke halamain ini</span>

Expand Down
4 changes: 2 additions & 2 deletions pages/id_ID/docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ layout: page
Automatically migrate your schema, to keep your schema up to date.

{% note warn %}
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision, nullable changed. It **WON'T** delete unused columns to protect your data.
**NOTE:** AutoMigrate will create tables, missing foreign keys, constraints, columns and indexes. It will change existing column's type if its size, precision changed, or if it's changing from non-nullable to nullable. It **WON'T** delete unused columns to protect your data.
{% endnote %}

```go
Expand Down Expand Up @@ -269,7 +269,7 @@ GORM creates constraints when auto migrating or creating table, see [Constraints

[Atlas](https://atlasgo.io) is an open-source database migration tool that has an official integration with GORM.

While GORM's `AutoMigrate` feature works in most cases, at some point you many need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.
While GORM's `AutoMigrate` feature works in most cases, at some point you may need to switch to a [versioned migrations](https://atlasgo.io/concepts/declarative-vs-versioned#versioned-migrations) strategy.

Once this happens, the responsibility for planning migration scripts and making sure they are in line with what GORM expects at runtime is moved to developers.

Expand Down
Loading

0 comments on commit d797c7b

Please sign in to comment.