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

Error running migration for payments table #186

Closed
lakuapik opened this issue Aug 26, 2020 · 6 comments
Closed

Error running migration for payments table #186

lakuapik opened this issue Aug 26, 2020 · 6 comments

Comments

@lakuapik
Copy link

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
Copy link
Owner

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

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

@Bottelet
Copy link
Owner

And which database, and version?

@lakuapik
Copy link
Author

lakuapik commented Sep 1, 2020

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 ae7c42c.

image

@lakuapik
Copy link
Author

lakuapik commented Sep 1, 2020

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.

@lakuapik lakuapik closed this as completed Sep 1, 2020
@Bottelet
Copy link
Owner

Bottelet commented Sep 1, 2020

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

@kobeumut
Copy link

kobeumut commented Apr 1, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants