dongpalou5352 2015-05-12 07:30
浏览 568

如何使用Beego框架进行数据库迁移?

I need to add a new field to existing table, what is the correct process to do this with Beego?

I am familiar with Django's south: first you generate the migration script with manage.py schema_migration, then execute the migration script manage.py migrate.

Beego has a command bee generate migration to generate migration script in database/migrations/xxx.go. But I don't understand how to use this generated script, it doesn't seem to be connected with anything.

And I don't see any documentation mentioning migration.

  • 写回答

3条回答 默认 最新

  • drkwpgrdb092239314 2015-10-08 09:23
    关注

    I think you also need to add in migration file beego. Then, bee migrate -driver='mysql' -conn='root:@tcp(127.0.0.1:3306)/test'

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog