zoukankan      html  css  js  c++  java
  • Lumen migration(数据库协同)

    建立迁移文件/新建表文件

    php artisan make:migration create_users_table

    添加字段

    php artisan make:migration add_column_user_type

    修改表

    php artisan make:migration change_user_table --table=banner

    执行迁移文件/其他人建立的文件

    php artisan migrate
    

      

    这样便实现多人开发的数据库表同步

    接下来看看自动建的migrations表

    自增主键id,运行的migration文件名,batch记录第几次运行脚本

    如果执行发现新增的表有问题,可以手动删除对应记录,改正migration文件后再运行

    参考:https://docs.golaravel.com/docs/5.0/migrations/

    https://9iphp.com/web/laravel/laravel-5-migrations.html

    http://laravelacademy.org/post/130.html

  • 相关阅读:
    P2610 [ZJOI2012]旅游
    P2323 [HNOI2006]公路修建问题
    P3629 [APIO2010]巡逻
    ARC059F
    AGC004D Teleporter
    p3203 弹飞绵羊
    bzoj5450 轰炸
    bzoj4313 三维积木
    cf123E Maze
    bzoj4423 [AMPPZ2013]Bytehattan
  • 原文地址:https://www.cnblogs.com/cxscode/p/8371789.html
Copyright © 2011-2022 走看看