SQLSTATE[42S01]: Base table or view already exists ? Install Admin Panel Issue !

Posted 2 months ago by N16h7h4wk

Attempting to install Voyager on Laravel 5.4 using the same SQL database as Laravel app.

These are the steps I took for installation:

1: cd /laravel_app

2: composer require tcg/voyager

3: My .env already has my DB credentials

4: My app_url within .env is: APP_URL=http://localhost:8000

5: Since I am running 5.4 I added serviceprovider within config/app.php

    /*
     * Package Service Providers...
     */
    Laravel\Tinker\TinkerServiceProvider::class,
    TCG\Voyager\VoyagerServiceProvider::class,
    /*
     * Application Service Providers...
     */

6: php artisan config:clear (If I don't do this before install I get Voyager command not found and or voyager namespace not a registered class)

7: php artisan voyager:install

This is what follows:

Publishing the Voyager assets, database, and config files Copied Directory [/vendor/tcg/voyager/publishable/assets] To [/public/vendor/tcg/voyager/assets]

Publishing complete.

Copied Directory [/vendor/tcg/voyager/publishable/database/seeds] To [/database/seeds]

Publishing complete.

Publishing complete.

Migrating the database tables into your application

  • Application In Production!     *
    

Do you really wish to run this command? (yes/no) [no]:

yes

In Connection.php line 647:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'settings' already exists (SQL: create table settings (id int unsigned not null auto_increment primary key, key varchar(191) not null, display_name varchar(191) not null, value text not null, details text null, type varchar(191) not null, order int not null default '1') default character set utf8mb4 collate utf8mb4_unicode_ci)

In PDOStatement.php line 107: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'settings' already exists

In PDOStatement.php line 105: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'settings' already exists

Other things I have tried are:

  • composer update

  • php artisan cache:clear

  • composer dumpautoload

Voyager is visible when I run php artisan

My goal is to use Voyager admin with my Laravel app

Any help is greatly appreciated

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

Reply to

Use Markdown with GitHub-flavored code blocks.