douyinjiao9351 2013-06-23 03:44
浏览 34
已采纳

Laravel和数据库设计

I asked this question on Reddit, but received no answer. I thought I would try here, instead.

I am new to Laravel, and have been going over the documentation and also watching Jeffrey Way's NetTuts videos. However I haven't gotten in too deep just yet, so if this is answered clearly somewhere else, please just point me in that direction.

I come from a CodeIgniter background, and for all projects I have done with it, I typically design my databases in MySQL Workbench. I also use this to make changes to the schema, and also as a visual map of the database. The MySQL Workbench file generally gets passed around with the other developers via Git.

Laravel seems to want you to create your tables using migrations, which seems a bit counter intuitive coming from the MySQL Workbench side. I understand that migrations act as a version control for the database, which seems pretty nice. However, other than that, I don't quite get the point just yet.

Can anyone explain to me why I should be building the tables out via the migrations feature of Laravel vs. the way I've been doing it?

  • 写回答

3条回答 默认 最新

  • doudeng2025 2013-06-23 04:01
    关注

    Laravel is a PHP framework. Like other frameworks, such as Zend, your development to deployment timeframe will be significantly reduced, as well as developing within a framework that can be understood by other developers as your projects becomes larger and you need more developers involved in the future.

    Migrations, as part of Laravel, are designed to quickly and easily setup a database scheme without the need to type any MySQL. It also presents the schema correctly. As your schema exists within a file, you can easily rollback and transport your schema with ease.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?