monicahq / monica

Personal CRM. Remember everything about your friends, family and business relationships.
https://beta.monicahq.com
GNU Affero General Public License v3.0
21.51k stars 2.15k forks source link

Migration fails after updating to 4.1.0 #7259

Open daryljones opened 5 months ago

daryljones commented 5 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

Migration fails after updating to 4.1.0

Steps to reproduce

  1. Existing working 4.0.0 non-docker installation
  2. Update to 4.1.0
  3. php artisan migrate
    ...

Expected behavior

I expected the migration to run without error. Instead, I get this.

$ php artisan migrate

INFO Running migrations.

2013_04_25_132851_create_accounts_table .................................................................................. 4.32ms FAIL

Illuminate\Database\QueryException

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'accounts' already exists (Connection: mysql, SQL: create table accounts (id char(36) not null, storage_limit_in_mb int not null default '0', created_at timestamp null, updated_at timestamp null, primary key (id)) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:813 809▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 810▕ ); 811▕ } 812▕ ➜ 813▕ throw new QueryException( 814▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 815▕ ); 816▕ } 817▕ }

  +9 vendor frames

10 database/migrations/2013_04_25_132851_create_accounts_table.php:14 Illuminate\Support\Facades\Facade::__callStatic() +26 vendor frames

37 artisan:13 Illuminate\Foundation\Application::handleCommand()

Environment

app.monicahq.com (monica v4)

Version of Monica

4.1.0

Installation method

Manual installation with Archive

Web server

Apache

Database engine version

MariaDB

Additional info

No response

asbiin commented 5 months ago

I don't see how version 4.1.0 could create that. It's more related to an architecture/installation issue than a monica-related bug. Anyway, I can't reproduce that.