I am trying to find a way to make all my ids start with the current year so 21 for example this is an id right now: 4321 and I want to turn this into 214321 so it's easier to find stuff by year. Is there any way I could do this without manually adding a 21 in front of where I print my id each time? this is how my ids are made and I tried to concatenate 21 to the id but it gives me an error.
id = db.Column(db.Integer, primary_key=True)
id = "21" + id
print(id)
This is the error I'm getting:
msr could not assemble any primary key columns for mapped table 'msr'
(msr
is the name of my database table)