Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the proper SQLAlchemy Type to store big strings?

I am learning sqlalchemy and I am a little confused about what type should I use to store data, which can be even 20000 character long. Is it a good idea to use Unicode(20000)? I am afraid, that in case of shorter texts I will waste to much memory.

like image 575
ts_pati Avatar asked Nov 24 '25 05:11

ts_pati


1 Answers

For that type of data you can use Text or UnicodeText. They do not require you to specify length.

like image 200
Antonio Beamud Avatar answered Nov 25 '25 17:11

Antonio Beamud



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!