fastapi / full-stack-fastapi-template

Full stack, modern web application template. Using FastAPI, React, SQLModel, PostgreSQL, Docker, GitHub Actions, automatic HTTPS and more.
MIT License
27.1k stars 4.82k forks source link

when i adding the background table this happened. #1295

Open FARMAN9 opened 2 months ago

FARMAN9 commented 2 months ago

Privileged issue

Issue Content

sqlalchemy.exc.IntegrityError: (psycopg.errors.NotNullViolation) null value in column "id" violates not-null constraint backend-1 | DETAIL: Failing row contains (admin@example.com, t, t, null, $2b$12$O1FGCpDKGwyy6wH6CEA0lOpBAxETlYbAg.ib9av622HcJ/YB1AY1C, null). backend-1 | [SQL: INSERT INTO "user" (email, is_active, is_superuser, full_name, hashed_password) VALUES (%(email)s::VARCHAR, %(is_active)s, %(is_superuser)s, %(full_name)s::VARCHAR, %(hashed_password)s::VARCHAR) RETURNING "user".id] backend-1 | [parameters: {'email': 'admin@example.com', 'is_active': True, 'is_superuser': True, 'full_name': None, 'hashed_password': '$2b$12$O1FGCpDKGwyy6wH6CEA0lOpBAxETlYbAg.ib9av622HcJ/YB1AY1C'}] backend-1 | (Background on this error at: https://sqlalche.me/e/20/gkpj)