Using Constraints in Flask-SQLAlchemy
Вставка
- Опубліковано 16 жов 2024
- This video demonstrates how to use database constraints in Flask-SQLAlchemy to ensure data integrity.
WORK WITH ME👇🏼
✅ Implement features and fix bugs in your app: Live, one-on-one screenshare
prettyprinted....
Join my free course on the basics of Flask-SQLAlchemy: prettyprinted....
To get the cheat sheet, go to: prettyprinted....
Join my free course on the basics of Flask-SQLAlchemy: prettyprinted.com/flasksql
HI, Instead of printing all the columns in GET request, How could I get only specific columns from the table?
Hi,
Really appreciate your work.
I wanted to know if we can change the constraints from flask after we have created the tables with some initial constraints. for ex - if i create a table with 'id' as the primary key then how can i change the constraints of 'id' and give any other column the primary key constraint.
Great content! Btw no flask-security video? And how can i secure flask-admin /admin route
Flask-Security is in the plans. I also plan on securing Flask-Admin, but here are the docs for now: flask-admin.readthedocs.io/en/latest/introduction/#authorization-permissions
could you make a tutorial using foreign keys?
Check out my Flask-SQLAlchemy playlist: ua-cam.com/play/PLXmMXHVSvS-BlLA5beNJojJLlpE0PJgCW.html
You can also view my Flask-SQLAlchemy Basics course on prettyprinted.com
thanks man. love your work.
do you have a flask/react js tutorial ?
Not yet, but I'll make one in the future.
what about using something like
__table_args__ = (UniqueConstraint("something", "somethingelse", name="giberish"),)
"Note that some databases do not actively support check constraints such as MySQL."
I don't know it until I see this video.
You would think it would. If you want to do it, you'll have to write your own check before the data gets added to the database.