UserExtended icon indicating copy to clipboard operation
UserExtended copied to clipboard

clake_userextended_route_restriction.attempts cant be NULL

Open mnvx opened this issue 8 years ago • 1 comments

When I try to create restriction on page backend/clake/userextended/routes/update/3:

"SQLSTATE[23502]: Not null violation: 7 ОШИБКА: нулевое значение в столбце "attempts" нарушает ограничение NOT NULL DETAIL: Ошибочная строка содержит (1, 2, null, null, , 2017-06-18 07:01:17, 2017-06-18 07:01:17, null, null, Доступ для Участника, , UE_WHITELIST). (SQL: insert into "clake_userextended_route_restriction" ("name", "description", "type", "ip", "user_id", "group_id", "role_id", "updated_at", "created_at") values (Доступ для Участника, , UE_WHITELIST, , , , 2, 2017-06-18 07:01:17, 2017-06-18 07:01:17) returning "id")" on line 666 of /var/www/zabor/vendor/laravel/framework/src/Illuminate/Database/Connection.php

My database is PostgreSQL.

mnvx avatar Jun 18 '17 07:06 mnvx

I has resolved it by

ALTER TABLE public.clake_userextended_route_restriction ALTER COLUMN attempts SET DEFAULT 0;

mnvx avatar Jun 18 '17 07:06 mnvx