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

"attempts" cant be NULL on adding route (PostgreSQL) #126

Open
mnvx opened this issue Jun 18, 2017 · 1 comment
Open

"attempts" cant be NULL on adding route (PostgreSQL) #126

mnvx opened this issue Jun 18, 2017 · 1 comment
Assignees

Comments

@mnvx
Copy link

mnvx commented Jun 18, 2017

My database is PostgreSQL.

When I try to add route on page backend/clake/userextended/routes/create

I have next error:

"SQLSTATE[23502]: Not null violation: 7 ОШИБКА: нулевое значение в столбце "attempts" нарушает ограничение NOT NULL
DETAIL: Ошибочная строка содержит (2, /blog, null, null, null, 2017-06-18 06:31:34, 2017-06-18 06:31:34, t, , f). (SQL: insert into "clake_userextended_routes" ("route", "description", "enabled", "cascade", "updated_at", "created_at") values (/blog, , 1, 0, 2017-06-18 06:31:34, 2017-06-18 06:31:34) returning "id")" on line 666 of /var/www/zabor/vendor/laravel/framework/src/Illuminate/Database/Connection.php

@mnvx
Copy link
Author

mnvx commented Jun 18, 2017

I resolved it with setting SET DEFAULT 0 for this field, but after this I have next error:

SQLSTATE[42703]: Undefined column: 7 ОШИБКА: столбец clake_userextended_routes_pivot.route_Id не существует LINE 1: ...id" = "clake_userextended_roles"."id") as "role", "clake_use... ^ HINT: Возможно, предполагалась ссылка на столбец "clake_userextended_routes_pivot.route_id". (SQL: select "clake_userextended_route_restriction".*, (select name from "users" where "clake_userextended_route_restriction"."user_id" = "users"."id") as "user", (select name from "user_groups" where "clake_userextended_route_restriction"."group_id" = "user_groups"."id") as "group", (select name from "clake_userextended_roles" where "clake_userextended_route_restriction"."role_id" = "clake_userextended_roles"."id") as "role", "clake_userextended_routes_pivot"."route_Id" as "pivot_route_Id", "clake_userextended_routes_pivot"."restriction_id" as "pivot_restriction_id" from "clake_userextended_route_restriction" inner join "clake_userextended_routes_pivot" on "clake_userextended_route_restriction"."id" = "clake_userextended_routes_pivot"."restriction_id" where "clake_userextended_route_restriction"."deleted_at" is null and "clake_userextended_routes_pivot"."route_Id" = 3 order by "name" desc)
/var/www/zabor/vendor/laravel/framework/src/Illuminate/Database/Connection.php line 666
I fixed it with setting SET DEFAULT 0 for this field, but after this I have next error:

SQLSTATE[42703]: Undefined column: 7 ОШИБКА: столбец clake_userextended_routes_pivot.route_Id не существует LINE 1: ...id" = "clake_userextended_roles"."id") as "role", "clake_use... ^ HINT: Возможно, предполагалась ссылка на столбец "clake_userextended_routes_pivot.route_id". (SQL: select "clake_userextended_route_restriction".*, (select name from "users" where "clake_userextended_route_restriction"."user_id" = "users"."id") as "user", (select name from "user_groups" where "clake_userextended_route_restriction"."group_id" = "user_groups"."id") as "group", (select name from "clake_userextended_roles" where "clake_userextended_route_restriction"."role_id" = "clake_userextended_roles"."id") as "role", "clake_userextended_routes_pivot"."route_Id" as "pivot_route_Id", "clake_userextended_routes_pivot"."restriction_id" as "pivot_restriction_id" from "clake_userextended_route_restriction" inner join "clake_userextended_routes_pivot" on "clake_userextended_route_restriction"."id" = "clake_userextended_routes_pivot"."restriction_id" where "clake_userextended_route_restriction"."deleted_at" is null and "clake_userextended_routes_pivot"."route_Id" = 3 order by "name" desc)
/var/www/zabor/vendor/laravel/framework/src/Illuminate/Database/Connection.php line 666

mnvx added a commit to mnvx/UserExtended that referenced this issue Jun 18, 2017
ShawnClake added a commit that referenced this issue Jun 28, 2017
@ShawnClake ShawnClake self-assigned this Jun 28, 2017
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

2 participants