Bottelet / DaybydayCRM

DaybydayCRM an open-source CRM, to help you keep track of your daily workflow.
https://daybydaycrm.com
2.26k stars 755 forks source link

Error running migration for payments table #186

Closed lakuapik closed 4 years ago

lakuapik commented 4 years ago

i got this error when running the migration:

SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: permissions.external_id (SQL: insert into "permissions" ("display_name", "name", "description", "grouping", "updated_at", "created_at") values (Add payment, payment-create, Be able to add a new payment on a invoice, payment, 2020-08-26 12:03:44, 2020-08-26 12:03:44))

image

its because on 2020_01_06_203615_create_payments_table.php migration file, the external_id is not set, and the external_id is not nullable on permissions table.

Bottelet commented 4 years ago

I am not getting this error which commands are you running?

I tried with artisan migrate:fresh --seed and I get no exceptions

Bottelet commented 4 years ago

And which database, and version?

lakuapik commented 4 years ago

i don't know exactly which version of daybydaycrm is, i just follow the installation instruction from https://github.com/Bottelet/DaybydayCRM/wiki/Install and clone the repo. i didnt see a version in composer.json file, but the latest commit is ae7c42ca778707db0a06f7b3bc22bd95f5a91342.

image

lakuapik commented 4 years ago

weirdly, i just tried to run artisan migrate again, it works and doesn't return any exception.

well i think im just going to close this issue.

Bottelet commented 4 years ago

Perfect as long as it works @lakuapik , feel free to open a issue and pr anytime :)

kobeumut commented 3 years ago

I have the same error if I am using PostgreSQL. I've tried two times but it's not working. Also, I have succeeded to install it with MySQL. I've tried to change the nullable field for external_id in the migration folder but I've got another error with pgsql. You should definitely look into this problem, I actually wanted to use it with pgsql.