I
I
Ivan Ivanov2018-03-14 13:43:09
Laravel
Ivan Ivanov, 2018-03-14 13:43:09

How to use quickstart and quickstart-intermediate at the same time in laravel?

The documentation https://laravel.ru/docs/v5/quickstart suggests creating two sites - quick start and deep start - https://laravel.ru/docs/v5/quickstart-intermediate .
I install the deep start in the quickstart-intermediate folder. But when I do

php artisan migrate
#вижу

  [Illuminate\Database\QueryException]
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'tasks' alre
  ady exists (SQL: create table `tasks` (`id` int unsigned not null auto_incr
  ement primary key, `user_id` int not null, `name` varchar(255) not null, `c
  reated_at` timestamp null, `updated_at` timestamp null) default character s
  et utf8 collate utf8_unicode_ci)



  [PDOException]
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'tasks' alre
  ady exists

Apparently because the tasks table already appeared when installing the quickstart site.
How to avoid conflict? Probably it is necessary to use other database, but how? When I tried to edit in config/database.php
'mysql' => [
            'driver'    => 'mysql',
            'host'      => env('DB_HOST', 'localhost'),
            'database'  => env('DB_DATABASE', 'forge1'),
            'username'  => env('DB_USERNAME', 'forge1'),
            'password'  => env('DB_PASSWORD', ''),
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
            'strict'    => false,
            'engine'    => null,
        ],

forge on forge1 - nothing helped. By the way, where does the forge base come from? Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question