dialect/entsql: add support for column default using annotation

Fixed #1033
This commit is contained in:
Ariel Mashraki
2021-04-02 17:10:00 +03:00
committed by Ariel Mashraki
parent 3db3f5fd1a
commit 745afde770
16 changed files with 319 additions and 30 deletions

View File

@@ -35,6 +35,19 @@ type Annotation struct {
//
Collation string `json:"collation,omitempty"`
// Default specifies the default value of a column. Note that using this option
// will override the default behavior of the code-generation. For example:
//
// entsql.Annotation{
// Default: "CURRENT_TIMESTAMP",
// }
//
// entsql.Annotation{
// Default: "uuid_generate_v4()",
// }
//
Default string `json:"default,omitempty"`
// Options defines the additional table options. For example:
//
// entsql.Annotation{