savannabits / charaza-ui

Lightweight Laravel 8 Admin CRUD generator and Starter template with Jetstream, Livewire and Tailwindcss Frontend
https://savannabits.github.io/charaza-ui/
49 stars 11 forks source link

Migration is failing continue... #10

Closed clawes closed 3 years ago

clawes commented 3 years ago

php artisan migrate is failing. It's try to add a column that already exists.

Migrating: 2020_11_19_170823_add_profile_photo_path_field_to_users

Illuminate\Database\QueryException

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'profile_photo_path' (SQL: alter table users add profile_photo_path varchar(255) null)

coolsam726 commented 3 years ago

I think when I created the project I was using a starter database dump which already contained all those fields. I will refactor the migrations so that migrations can run without any starter dump.

coolsam726 commented 3 years ago

To solve the migration issue, when you create a new project first of all restore the dump located at docker-compose/mysql/init_db.sql into your database, then run php artisan migrate