IntegrityError: ERROR: null value in column “user_id” violates not-null constraint
Using: postgres (PostgreSQL) 9.4.5 I just migrated a sqlite3 db onto a postgresql db. For some reason since this migration, when I try to create a user, an error regarding the user_id (which is a primary key) is being raised. This was not an issue before with sqlite3 . I have spent time looking through the docs and stack questions, but remain confused. Inside api.create_user() : api.create_user(username ='lola ', firstname ='cats ', lastname ='lcatk', email='cags@falc.com') sqlalchemy db Model: class User(Base): __tablename__ = 'users' #user_id = Column(Integer, primary_key=True) #changed to: