ds3016 2017-05-04 15:02 采纳率: 100%
浏览 87

Heroku上的Laravel数据库迁移

I need to add a new table to my databases on a laravel project. However, I already have data in production and the code is deployed on heroku.

If I create a table on heroku and run a migration on heroku, that won't be reflected in my local code.

Is the proper method to create the table and migration in the local copy, push the code to heroku, and then run another migration on heroku?

If that is the case, do I first run something like this command to create the migration file, then edit the migration file to the table properties that I desire, and then push to heroku and run a migration or do I need to run a migration on my local copy first?

php artisan make:migration create_users_table --create=users

Thanks

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 全志H618ROM新增分区
    • ¥20 jupyter保存图像功能的实现
    • ¥15 在grasshopper里DrawViewportWires更改预览后,禁用电池仍然显示
    • ¥15 NAO机器人的录音程序保存问题
    • ¥15 C#读写EXCEL文件,不同编译
    • ¥15 MapReduce结果输出到HBase,一直连接不上MySQL
    • ¥15 扩散模型sd.webui使用时报错“Nonetype”
    • ¥15 stm32流水灯+呼吸灯+外部中断按键
    • ¥15 将二维数组,按照假设的规定,如0/1/0 == "4",把对应列位置写成一个字符并打印输出该字符
    • ¥15 NX MCD仿真与博途通讯不了啥情况