Recent Topics

problem with database



  • i'm nwely setup bagisto ec laravel shop but when i've navigated to public this showing to me

    Warning: mysqli::close(): Couldn't fetch mysqli in C:\xamp\htdocs\bagisto\public\installer\index.php on line 100

    this my env file database options![alt text](image url)

    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=bagisto
    DB_USERNAME=admin
    DB_PASSWORD=admin

    and this my config/database.php options

    'mysql' => [
    'driver' => 'mysql',
    'host' => env('DB_HOST', '127.0.0.1'),
    'port' => env('DB_PORT', '3306'),
    'database' => env('DB_DATABASE', 'bagisto'),
    'username' => env('DB_USERNAME', 'admin'),
    'password' => env('DB_PASSWORD', 'admin'),
    'unix_socket' => env('DB_SOCKET', ''),
    'charset' => 'utf8mb4',
    'collation' => 'utf8mb4_unicode_ci',
    'prefix' => '',
    'strict' => false,
    'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
    ],

    and something else when i'm trying to use sqlite database it's showing error for me as i remember that sqlite does't accept that 2 things in one file
    [email protected] MINGW64 /c/xamp/htdocs/bagisto (master)
    $ touch database/database.sqlite

    [email protected] MINGW64 /c/xamp/htdocs/bagisto (master)
    $ pa migrate
    Migration table created successfully.

    BadMethodCallException : SQLite doesn't support multiple calls to dropColumn / renameColumn in a single modification.

    at C:\xamp\htdocs\bagisto\vendor\laravel\framework\src\Illuminate\Database\Schema\Blueprint.php:133
    129| protected function ensureCommandsAreValid(Connection $connection)
    130| {
    131| if ($connection instanceof SQLiteConnection &&
    132| $this->commandsNamed(['dropColumn', 'renameColumn'])->count() > 1) {

    133| throw new BadMethodCallException(
    134| "SQLite doesn't support multiple calls to dropColumn / renameColumn in a single modification."
    135| );
    136| }
    137| }

    Exception trace:

    1 Illuminate\Database\Schema\Blueprint::ensureCommandsAreValid(Object(Illuminate\Database\SQLiteConnection))
    C:\xamp\htdocs\bagisto\vendor\laravel\framework\src\Illuminate\Database\Schema\Blueprint.php:108

    2 Illuminate\Database\Schema\Blueprint::toSql(Object(Illuminate\Database\SQLiteConnection), Object(Illuminate\Database\Schema\Grammars\SQLiteGrammar))
    C:\xamp\htdocs\bagisto\vendor\laravel\framework\src\Illuminate\Database\Schema\Blueprint.php:87

    Please use the argument -v to see more details.

    alt text



  • Hi @adamkaram

    Can you tell us your mysql version.

    Thanks


Log in to reply