#NEWLINE# def _raise_pk_with_no_anticipated_value( c ) : #NEWLINE# #INDENT# msg = ( "Column '%s.%s' is marked as a member of the primary key for table '%s', 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." % ( c . table . fullname , c . name , c . table . fullname ) ) #NEWLINE# if ( len ( c . table . primary_key . columns ) > 1 ) : #NEWLINE# #INDENT# msg += " 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." #NEWLINE# #UNINDENT# raise exc . CompileError ( msg )