Node Sequelize tutorial with Postgres | Sequelize migrations and seed data

כללי / תכנות כללי 50K צפיות 15/02/2021
פתח ב-YouTube

דרג סרטון זה

התחבר כדי לדרג

תיאור

🔥More exclusive content: https://productioncoder.com/you-decide-what-we-build-next Twitter: https://twitter.com/_jgoebel Blog: https://productioncoder.com Website: https://jangoebel.com Full code: https://github.com/productioncoder/sequelize-tutorial This video covers how to use Sequelize in a Node.js application. We use the Sequelize node ORM to connect to a Postgres database. We also cover how to do Sequelize migrations in Node and how use the Sequelize CLI to create seed data in your database. 00:00 introduction 02:17 project setup 03:45 introduction to Sequelize migrations with Sequelize CLI 05:45 connecting to Postgres with Sequelize 09:54 creating our first Sequelize migration 14:54 creating Sequelize migrations with foreign keys 18:17 where to place foreign keys in 1:1 relationships 21:23 adding foreign keys to tables in Sequelize 24:28 code to undo migrations 26:13 running migrations with Sequelize CLI 28:51 undoing Sequelize migrations 31:00 how to create seed data in Sequelize 32:44 adding example users in seed files 35:54 adding example channel seed data 36:52 inserting channel seed data 37:30 running seeds in Sequelize 37:56 creating a script to run seeds 38:08 testing seed runs in Sequelize 39:22 conclusion

#Jan Goebel