Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use Artisan due to 'settings table doesn't exist error #2

Open
karneaud opened this issue May 18, 2019 · 1 comment
Open

Comments

@karneaud
Copy link

For some reason I get the following error running any artisan command on a fresh install

In Connection.php line 664:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test_db.settings' doesn't exist (SQL: select * from
settings where key = app-name and settings.deleted_at is null limit 1)

In PDOConnection.php line 79:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test_db.settings' doesn't exist

In PDOConnection.php line 77:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test_db.settings' doesn't exist

Steps to reproduce:-

  1. run composer create-project ....
  2. run php artisan package:discover

Environment

  • PHP 7.3.5 FPM
  • composer latest

Composer.json

{
    "name": "dandisy/webcore",
    "description": "Webcore Platform - Single platform laravel site ready to be built as per your needs",
    "keywords": ["framework", "laravel", "webcore", "backend", "generator", "cms", "admin", "web", "app", "platform"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=7.0.0",
        "arrilot/laravel-widgets": "^3.7",
        "dandisy/adminlte-templates": "^1.0.0",
        "dandisy/filemanager": "^1.0.0",
        "dandisy/laravel-generator": "^1.0.0",
        "dandisy/swagger-generator": "^1.0.0",
        "doctrine/dbal": "~2.3",
        "fideloper/proxy": "~3.3",
        "jlapp/swaggervel": "dev-master",
        "laravel/framework": "5.5.*",
        "laravel/passport": "^4.0",
        "laravel/tinker": "~1.0",
        "laravelcollective/html": "^5.5.0",
        "league/glide-laravel": "^1.0",
        "santigarcor/laratrust": "^4.0",
        "spatie/laravel-cors": "^1.0",
        "yajra/laravel-datatables-buttons": "3.0",
        "yajra/laravel-datatables-oracle": "~8.0"
    },
    "require-dev": {
        "barryvdh/laravel-debugbar": "^3.1",
        "filp/whoops": "~2.0",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~6.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\\": "app/",
            "Webcore\\": "packages/webcore/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": [
            ]
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    }
}

@dandisy
Copy link
Owner

dandisy commented Jun 23, 2019

sorry for the delay, the error that you encountered is my mistake, this is because seeding data settings while setting tables and databases do not yet exist.

now I have fixed it by commenting on the seeding in the DatabaseSeeder class

// $this->call(SettingsTableSeeder::class);
$this->call(LaratrustSeeder::class);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants