fix: remove autoincrement option for composite PK fields
				
					
				
			This commit is contained in:
		
							parent
							
								
									465e565f7b
								
							
						
					
					
						commit
						023d826d31
					
				
					 1 changed files with 8 additions and 3 deletions
				
			
		|  | @ -80,7 +80,9 @@ class TableSyncRule(Base): | |||
|     """ | ||||
|     __tablename__ = 'TableSyncRules' | ||||
| 
 | ||||
|     id = sa.Column('tableSyncRuleID', sa.Integer(), nullable=False, primary_key=True, autoincrement=True) | ||||
|     # nb. this should be autoincrement, but we can't do that | ||||
|     # automatically via sqlalchemy when PK is composite | ||||
|     id = sa.Column('tableSyncRuleID', sa.Integer(), nullable=False, primary_key=True) | ||||
| 
 | ||||
|     table_name = sa.Column('tableName', sa.String(length=255), nullable=False, primary_key=True) | ||||
| 
 | ||||
|  | @ -1617,8 +1619,11 @@ class CustomReceiptLine(Base): | |||
|     """ | ||||
|     __tablename__ = 'customReceipt' | ||||
| 
 | ||||
|     sequence = sa.Column('seq', sa.Integer(), primary_key=True, autoincrement=True, nullable=False) | ||||
|     type = sa.Column(sa.String(length=20), primary_key=True, autoincrement=False, nullable=False) | ||||
|     # nb. this should be autoincrement, but we can't do that | ||||
|     # automatically via sqlalchemy when PK is composite | ||||
|     sequence = sa.Column('seq', sa.Integer(), primary_key=True, nullable=False) | ||||
| 
 | ||||
|     type = sa.Column(sa.String(length=20), primary_key=True, nullable=False) | ||||
|     text = sa.Column(sa.String(length=80), nullable=True) | ||||
| 
 | ||||
|     def __str__(self): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue