2017-02-08 3 views
0

저는 초보자입니다. 왜 laraval migrate가 데이터베이스에 내 테이블을 만들지 않는지 묻고 싶습니다.Laravel은 postgresql 데이터베이스에서 테이블을 생성하지 않습니다.

PostgreSQL의 실행에 다음

newFootball = 2017_02_08_130207_create_articles_table :

<?php 

use Illuminate\Support\Facades\Schema; 
use Illuminate\Database\Schema\Blueprint; 
use Illuminate\Database\Migrations\Migration; 

class CreateMySongsTable extends Migration 
{ 
    /** 
    * Run the migrations. 
    * 
    * @return void 
    */ 
    public function up() 
    { 
     Schema::create('songs', function (Blueprint $table) { 
      $table->increments('id'); 
      $table->string('title'); 
      $table->string('artist'); 
      $table->timestamps(); 
     }); 
    } 

    /** 
    * Reverse the migrations. 
    * 
    * @return void 
    */ 
    public function down() 
    { 
     Schema::dropIfExists('songs'); 
    } 
} 

첫째 1.run PHP 장인 마이그레이션 마이그레이션 : 이것은 내 마이그레이션 파일이

APP_ENV=local 
APP_KEY=base64:9FLWfylvrtxjXdunJujBDq37Q4QtKcoiPdmeJbgbLSg= 
APP_DEBUG=true 
APP_LOG_LEVEL=debug 
APP_URL=http://localhost 

DB_CONNECTION=pgsql 
DB_HOST=localhost 
DB_PORT=5432 
DB_DATABASE=laravel5 
DB_USERNAME=postgres 
DB_PASSWORD=1111 

BROADCAST_DRIVER=log 
CACHE_DRIVER=file 
SESSION_DRIVER=file 
QUEUE_DRIVER=sync 

REDIS_HOST=127.0.0.1 
REDIS_PASSWORD=null 
REDIS_PORT=6379 

MAIL_DRIVER=smtp 
MAIL_HOST=mailtrap.io 
MAIL_PORT=2525 
MAIL_USERNAME=null 
MAIL_PASSWORD=null 
MAIL_ENCRYPTION=null 

PUSHER_APP_ID= 
PUSHER_APP_KEY= 
PUSHER_APP_SECRET= 

입니다 : 이것은 내 .env의 파일입니다 # \ dt 관계가 없습니다.

누군가 나를 도와주세요. 양해 해 주셔서 감사합니다.

답변

0

마지막으로 해결책을 찾았습니다. 다음 명령을 실행하는 데 필요한 .env 파일의 변경으로 인해.

php artisan config:cache 

그럼 모두 완벽합니다. 고맙습니다.