Nine_Tails
3 weeks ago
245
8
Laravel

php artisan migrate ran successfully but doe not create tables

Posted 3 weeks ago by Nine_Tails

I ran artisan migrate command successfully but I don't see any tables created in my database.

Here is full background =>

I am using XAMPP server with PostgreSQL(9.5) (Both servers were running at the time of creating the project) for my Laravel project

I created my project with the following command:

laravel new myapp --auth

I updated my .env file as below:

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=postgres
DB_USERNAME=postgres
DB_PASSWORD=1234

then I updated database.php

'default' => env('DB_CONNECTION', 'pgsql'),

I tried running the following command

php artisan migrate

but I got this

nothing to migrate

I googled for the above problem and ran the following command

php artisan migrate:fresh

It worked and i got the following output

Migrating: 2014_10_12_000000_create_users_table
Migrated:  2014_10_12_000000_create_users_table (2.46 seconds)
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated:  2014_10_12_100000_create_password_resets_table (2.46 seconds)
Migrating: 2019_08_19_000000_create_failed_jobs_table
Migrated:  2019_08_19_000000_create_failed_jobs_table (1.54 seconds)

however, when I checked my psql terminal, I don't find any tables

C:\Users\Akshay>psql -U postgres
Password for user postgres:
psql (9.5.23)
WARNING: Console code page (437) differs from Windows code page (1252)
         8-bit characters might not work correctly. See psql reference
         page "Notes for Windows users" for details.
Type "help" for help.

postgres=# \d
No relations found.
postgres=#

I tried the following commands too

php artisan config:clear
php artisan cache:clear

The problem persists.

Please sign in or create an account to participate in this conversation.