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

Can’t refresh the settings migration file #127

Closed
kai0310 opened this issue Apr 2, 2022 · 1 comment
Closed

Can’t refresh the settings migration file #127

kai0310 opened this issue Apr 2, 2022 · 1 comment

Comments

@kai0310
Copy link

kai0310 commented Apr 2, 2022

Hey there 👋
When I run php artisan migrate:fresh I get the following error message. This may not be a bug report but simply my lack of understanding.

Output error message

  SQLSTATE[HY000]: General error: 1 table "settings" already exists (SQL: create table "settings" ("id" integer not null primary key autoincrement, "group" varchar not null, "name" varchar not null, "locked" tinyint(1) not null, "payload" text not null, "created_at" datetime, "updated_at" datetime))

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:716
    712▕         // If an exception occurs when attempting to run a query, we'll format the error
    713▕         // message to include the bindings with SQL, which will make this exception a
    714▕         // lot more helpful to the developer instead of just the database's errors.
    715▕         catch (Exception $e) {
  ➜ 716▕             throw new QueryException(
    717▕                 $query, $this->prepareBindings($bindings), $e
    718▕             );
    719▕         }
    720▕     }

      +9 vendor frames 
  10  database/migrations/2021_11_09_234820_create_settings_table.php:20
      Illuminate\Support\Facades\Facade::__callStatic("create")

      +33 vendor frames 
  44  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
@rubenvanassche
Copy link
Member

You should take a look at the previous migrations within your project, somehow another settings table is being created. You should remove this migration or rename the settings table of this package and configure it within the repository.

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