Have you tried using the latest docker image / code base: yes
Describe the bug
Using a fresh database, main runs starting database init which first will run AutoMigrate on all models, including Vehicle with VIN field already in it. After that proceeds to "normal" migration which will try to add VIN again and will error because AutoMigrate already did and because it errors wont sign that migration as done.
hammond | 2024/08/24 17:27:12 /api/db/migrations.go:39 record not found
hammond | [0.081ms] [rows:0] SELECT * FROM `migrations` WHERE name="2022_03_08_13_16_AddVIN" ORDER BY `migrations`.`id` LIMIT 1
hammond | ALTER TABLE vehicles ADD COLUMN vin text
hammond |
hammond | 2024/08/24 17:27:12 /api/db/migrations.go:42 duplicate column name: vin
hammond | [0.015ms] [rows:0] ALTER TABLE vehicles ADD COLUMN vin text
To Reproduce
Steps to reproduce the behavior:
New installation
Fresh database
Error on migrate
Expected behavior
On a fresh install it add all migrations as done.
Describe the bug Using a fresh database, main runs starting database init which first will run AutoMigrate on all models, including Vehicle with VIN field already in it. After that proceeds to "normal" migration which will try to add VIN again and will error because AutoMigrate already did and because it errors wont sign that migration as done.
To Reproduce Steps to reproduce the behavior:
Expected behavior On a fresh install it add all migrations as done.