golang tag不带gorm也会创建表
type Student struct {
Age int
Name string
}
func (it *ServiceContext) AutoMigrate() {
it.DB.AutoMigrate(
&Student{},
)
}
// 数据库中照样会创建这张 student 表,并且该表 有 age name 这两个字段
type Student struct {
Age int
Name string
}
func (it *ServiceContext) AutoMigrate() {
it.DB.AutoMigrate(
&Student{},
)
}
// 数据库中照样会创建这张 student 表,并且该表 有 age name 这两个字段
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期
· 全程使用 AI 从 0 到 1 写了个小工具
· 从文本到图像:SSE 如何助力 AI 内容实时呈现?(Typescript篇)
2021-04-12 Linux - 通过LVM对磁盘进行动态扩容 (Linux的逻辑卷)
2019-04-12 Django + Uwsgi + Nginx 的生产环境部署
2019-04-12 ZooKeeper集群详细安装教程
2018-04-12 haproxy做TCP层的负载均衡
2018-04-12 nginx 代理tcp长连接短连接配置
2018-04-12 Nginx Upstream Keepalive 分析 保持长连接