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

Every time I upgrade Mercator (using docker), the database upgrade fails #924

Open
cedrictemple opened this issue Oct 28, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@cedrictemple
Copy link

Hi,

Every time I upgrade Mercator, the database upgrade fails with an error :

mercator  |    INFO  Running migrations.  
mercator  | 
mercator  |   2024_10_27_192442_add_ldap_columns_to_users_table .............. 4.12ms FAIL
mercator  | 
mercator  |    Illuminate\Database\QueryException 
mercator  | 
mercator  |   SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'guid' (Connection: mysql, SQL: alter table `users` add `guid` varchar(255) null)

Each time I upgrade, i have to delete the file database/migrations/YYYY_MM_DD_192442_add_ldap_columns_to_users_table.php (where YYYY_MM_DD seems to represent the date of the Docker image update). I delete the file beacause, I have debug it and it seems that all actions made by this file are already made. But I don't know why this file is recreated each time (with a new date) I upgrade.

Please note that I'm using Docker, I don't know if this is relevant or not, I jut want to tell it because I don't see this file in source code.

How can I fix that ?

Many thanks !

@dbarzin
Copy link
Owner

dbarzin commented Oct 28, 2024

This file is generated by this command :

php artisan vendor:publish --all

It is needed the first time but not later. We have to improve the docker update process. See also : #918

@dbarzin dbarzin self-assigned this Oct 28, 2024
@dbarzin dbarzin added the bug Something isn't working label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants