phphub icon indicating copy to clipboard operation
phphub copied to clipboard

部署本地PHPhub时出现问题

Open BarryGibb opened this issue 8 years ago • 3 comments

database.php中配置好了数据库连接 使用 php artisan migrate --seed 处理数据库的时候出错

$ php artisan migrate --seed


  • Application In Production!     *
    

Do you really wish to run this command? yes Migration table created successfully. Migrated: 2014_01_03_011552_create_site_statuses_table Migrated: 2014_08_08_234417_create_users_table Migrated: 2014_08_10_085349_create_topics_table Migrated: 2014_08_10_091306_create_nodes_table Migrated: 2014_08_12_124425_create_replies_table Migrated: 2014_08_13_130603_entrust_setup_tables Migrated: 2014_08_14_221225_create_tips_table Migrated: 2014_08_15_163951_create_links_table Migrated: 2014_08_16_200848_create_favorites_table Migrated: 2014_08_19_080606_create_notifications_table Migrated: 2014_08_19_083110_add_notifications_field_to_user_table Migrated: 2014_08_19_162628_create_attention_table Migrated: 2014_08_20_130447_create_votes_table Migrated: 2014_08_22_112136_add_order_field_to_topic_table Migrated: 2014_08_24_080733_add_body_original_field_to_topics_table Migrated: 2014_08_24_102913_add_excerpt_field_to_topics_table Migrated: 2014_08_27_092832_add_github_name_filed_to_users_table Migrated: 2014_08_27_210652_add_body_original_filed_to_replies_table Migrated: 2014_10_12_080007_add_cover_field_to_links_table Migrated: 2015_03_02_102317_create_appends_table Migrated: 2015_03_25_115359_add_avatar_to_users 303 pic (错误信息)

数据库里表都迁移好了,数据填充没有填充进去,怎么解决呢?

BarryGibb avatar Mar 01 '16 02:03 BarryGibb

@BarryGibb

  • 运行一下
php artisan migrate:refresh
  • 或者改一下usertableseeder用faker给github_name赋值
  • 或者2014_08_27_092832_add_github_name_filed_to_users_table新增的github_name允许空

tomhaoye avatar Mar 03 '16 15:03 tomhaoye

@tomhaoye 这个问题解决了,npm install安装模块的时候又是很多错误= =

npm-debug.txt

BarryGibb avatar Mar 04 '16 09:03 BarryGibb

@BarryGibb 那个package.json

"gulp-sass": "^0.7.1"

改一下版本吧,貌似用不了了,作为一个开发人员要学会看错误信息额,后面写得很清楚。

tomhaoye avatar Mar 05 '16 09:03 tomhaoye