【问题标题】:Why Deleted migration in laravel app migrate when using migrate:fresh or others为什么在使用 migrate:fresh 或其他时在 laravel 应用程序迁移中删除了迁移
【发布时间】:2020-08-15 20:16:35
【问题描述】:

CMD 命令结果:

PS D:\WampDatabase\www\PakistanBloodDonors> php artisan migrate                                                         Migrating: 2014_10_12_000000_create_users_table
Migrated:  2014_10_12_000000_create_users_table (0.37 seconds)
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated:  2014_10_12_100000_create_password_resets_table (0.26 seconds)
Migrating: 2019_09_22_192348_create_messages_table
Migrated:  2019_09_22_192348_create_messages_table (0.31 seconds)
Migrating: 2019_10_16_211433_create_favorites_table
Migrated:  2019_10_16_211433_create_favorites_table (0.19 seconds)
Migrating: 2019_10_18_223259_add_avatar_to_users
Migrated:  2019_10_18_223259_add_avatar_to_users (0 seconds)
Migrating: 2019_10_20_211056_add_messenger_color_to_users
Migrated:  2019_10_20_211056_add_messenger_color_to_users (0.19 seconds)
Migrating: 2019_10_22_000539_add_dark_mode_to_users
Migrated:  2019_10_22_000539_add_dark_mode_to_users (0.14 seconds)
Migrating: 2019_10_25_214038_add_active_status_to_users
Migrated:  2019_10_25_214038_add_active_status_to_users (0.28 seconds)
Migrating: 2020_03_25_130425_create_admins_table
Migrated:  2020_03_25_130425_create_admins_table (0.28 seconds)
Migrating: 2020_04_24_043508_create_opinions_table
Migrated:  2020_04_24_043508_create_opinions_table (0.12 seconds)
Migrating: 2020_04_27_034017_create_volunteers_table
Migrated:  2020_04_27_034017_create_volunteers_table (0.1 seconds)
Migrating: 2020_04_27_145232_create_contacts_table
Migrated:  2020_04_27_145232_create_contacts_table (0.08 seconds)

问题是我在 laravel 迁移文件夹中只有 users_table 、admins_table 、volutors_table 、 opinion_table 和 contact_table .. 但是当我使用命令php artisan migrate:fresh然后它会创建上面的所有迁移,其中自动包含messages_table、favorites_table 和其他表。 .我不知道这些从哪里来并迁移...

为什么这个问题基本上会产生?有谁知道吗?

【问题讨论】:

    标签: laravel migration


    【解决方案1】:

    正如你所说,它是 chatify 迁移,原因是你没有正确删除所有文件,你应该在你的供应商或其他地方查找,你会找到 chatify 文件夹然后删除它

    正如你在包仓库中看到的那样

    https://github.com/munafio/chatify

    你会发现数据库进入它你会发现迁移和它就像你的应用程序创建的表一样

    在这里您可以找到有关如何正确删除软件包的问题,​​看看可能会很好

    How to remove a package from Laravel using composer?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-29
      • 2018-02-07
      • 2017-09-03
      • 2015-04-08
      • 2014-10-06
      • 2017-03-26
      • 2010-09-30
      • 1970-01-01
      相关资源
      最近更新 更多