Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /usr/local/lib/python3.6/site-packages/sqlalchemy/sql/crud.py:692: SAWarning: Column 'company_users.id' is marked as a member of the primary key for table 'company_users', but has no Python-side or server-side default generator indicated, nor does it indicate 'autoincrement=True' or 'nullable=True', and no explicit value is passed. Primary key columns typically may not store NULL. Note that as of SQLAlchemy 1.1, 'autoincrement=True' must be indicated explicitly for composite (e.g. multicolumn) primary keys if AUTO_INCREMENT/SERIAL/IDENTITY behavior is expected for one of the columns in the primary key. CREATE TABLE statements are impacted by this change as well on most backends.
- util.warn(msg)
- *** sqlalchemy.exc.IntegrityError: (psycopg2.IntegrityError) null value in column "id" violates not-null constraint
- DETAIL: Failing row contains (null, 2, 1, 0, 2018-01-07 14:49:06.901742, null).
- [SQL: 'INSERT INTO company_users (company_id, user_id, role, created_at, updated_at) VALUES (%(company_id)s, %(user_id)s, %(role)s, %(created_at)s, %(updated_at)s)'] [parameters: {'company_id': 2, 'user_id': 1, 'role': 0, 'created_at': datetime.datetime(2018, 1, 7, 14, 49, 6, 901742), 'updated_at': None}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement