Skip to content

can we support automigrate, no need use cli to do that?Β #1217

@heliping

Description

@heliping

I am a new comer. the sea-orm is amazing.

I am familiar with gorm.
in gorm, the migrate is auto, very convenient.
firstly, you can define a struct and table name.

type ColumnOriC4 struct {	
	Name       string `gorm:"column:name"`
	Desc       string `gorm:"column:desc"`
}

func (ColumnOriC4) TableName() string {
	return "tab_conf_c4_columnoric4_info"
}

secondly, only code like this with db connect.

db.AutoMigrate(&ColumnOriC4{})

no need cli. when the table changed, the migrate is auto.
coder no need to care about that.
I think maybe it is a idea to migrate. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions