├── .gitignore ├── 01_one-to-many ├── .sequelizerc ├── README.md ├── bin │ └── www ├── config │ └── config.json ├── controllers │ ├── task-controller.js │ └── user-controller.js ├── migrations │ ├── 20180301011032-create-user.js │ └── 20180301011033-create-task.js ├── models │ ├── index.js │ ├── task.js │ └── user.js ├── package.json ├── routes │ ├── tasks.js │ └── users.js ├── server.js └── yarn.lock ├── 02_zero-to-many ├── .sequelizerc ├── README.md ├── bin │ └── www ├── config │ └── config.json ├── controllers │ ├── project-controller.js │ └── user-controller.js ├── migrations │ ├── 20180301011032-create-user.js │ └── 20180301011033-create-project.js ├── models │ ├── index.js │ ├── project.js │ └── user.js ├── package.json ├── routes │ ├── projects.js │ └── users.js ├── seeders │ └── 20180312052035-create-users.js ├── server.js └── yarn.lock ├── 03_one-to-one ├── .sequelizerc ├── README.md ├── bin │ └── www ├── config │ └── config.json ├── controllers │ ├── passport-controller.js │ └── user-controller.js ├── migrations │ ├── 20180301011032-create-user.js │ └── 20180301011033-create-passport.js ├── models │ ├── index.js │ ├── passport.js │ └── user.js ├── package.json ├── routes │ ├── passports.js │ └── users.js ├── server.js └── yarn.lock ├── 04_many-to-many ├── .sequelizerc ├── README.md ├── bin │ └── www ├── config │ └── config.json ├── controllers │ ├── ingredient-controller.js │ └── recipe-controller.js ├── migrations │ ├── 20180301011032-create-recipe.js │ ├── 20180301011033-create-ingredient.js │ └── 20180301011034-create-RecipeIngredient.js ├── models │ ├── index.js │ ├── ingredient.js │ ├── recipe-ingredient.js │ └── recipe.js ├── package.json ├── routes │ ├── ingredients.js │ └── recipes.js ├── server.js └── yarn.lock └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | node_modules 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /01_one-to-many/.sequelizerc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/.sequelizerc -------------------------------------------------------------------------------- /01_one-to-many/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/README.md -------------------------------------------------------------------------------- /01_one-to-many/bin/www: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/bin/www -------------------------------------------------------------------------------- /01_one-to-many/config/config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/config/config.json -------------------------------------------------------------------------------- /01_one-to-many/controllers/task-controller.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/controllers/task-controller.js -------------------------------------------------------------------------------- /01_one-to-many/controllers/user-controller.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/controllers/user-controller.js -------------------------------------------------------------------------------- /01_one-to-many/migrations/20180301011032-create-user.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/migrations/20180301011032-create-user.js -------------------------------------------------------------------------------- /01_one-to-many/migrations/20180301011033-create-task.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/migrations/20180301011033-create-task.js -------------------------------------------------------------------------------- /01_one-to-many/models/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/models/index.js -------------------------------------------------------------------------------- /01_one-to-many/models/task.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/models/task.js -------------------------------------------------------------------------------- /01_one-to-many/models/user.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/models/user.js -------------------------------------------------------------------------------- /01_one-to-many/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/package.json -------------------------------------------------------------------------------- /01_one-to-many/routes/tasks.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/routes/tasks.js -------------------------------------------------------------------------------- /01_one-to-many/routes/users.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/routes/users.js -------------------------------------------------------------------------------- /01_one-to-many/server.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/server.js -------------------------------------------------------------------------------- /01_one-to-many/yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/01_one-to-many/yarn.lock -------------------------------------------------------------------------------- /02_zero-to-many/.sequelizerc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/.sequelizerc -------------------------------------------------------------------------------- /02_zero-to-many/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/README.md -------------------------------------------------------------------------------- /02_zero-to-many/bin/www: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/bin/www -------------------------------------------------------------------------------- /02_zero-to-many/config/config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/config/config.json -------------------------------------------------------------------------------- /02_zero-to-many/controllers/project-controller.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/controllers/project-controller.js -------------------------------------------------------------------------------- /02_zero-to-many/controllers/user-controller.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/controllers/user-controller.js -------------------------------------------------------------------------------- /02_zero-to-many/migrations/20180301011032-create-user.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/migrations/20180301011032-create-user.js -------------------------------------------------------------------------------- /02_zero-to-many/migrations/20180301011033-create-project.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/migrations/20180301011033-create-project.js -------------------------------------------------------------------------------- /02_zero-to-many/models/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/models/index.js -------------------------------------------------------------------------------- /02_zero-to-many/models/project.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/models/project.js -------------------------------------------------------------------------------- /02_zero-to-many/models/user.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/models/user.js -------------------------------------------------------------------------------- /02_zero-to-many/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/package.json -------------------------------------------------------------------------------- /02_zero-to-many/routes/projects.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/routes/projects.js -------------------------------------------------------------------------------- /02_zero-to-many/routes/users.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/routes/users.js -------------------------------------------------------------------------------- /02_zero-to-many/seeders/20180312052035-create-users.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/seeders/20180312052035-create-users.js -------------------------------------------------------------------------------- /02_zero-to-many/server.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/server.js -------------------------------------------------------------------------------- /02_zero-to-many/yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/02_zero-to-many/yarn.lock -------------------------------------------------------------------------------- /03_one-to-one/.sequelizerc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/.sequelizerc -------------------------------------------------------------------------------- /03_one-to-one/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/README.md -------------------------------------------------------------------------------- /03_one-to-one/bin/www: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/bin/www -------------------------------------------------------------------------------- /03_one-to-one/config/config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/config/config.json -------------------------------------------------------------------------------- /03_one-to-one/controllers/passport-controller.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/controllers/passport-controller.js -------------------------------------------------------------------------------- /03_one-to-one/controllers/user-controller.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/controllers/user-controller.js -------------------------------------------------------------------------------- /03_one-to-one/migrations/20180301011032-create-user.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/migrations/20180301011032-create-user.js -------------------------------------------------------------------------------- /03_one-to-one/migrations/20180301011033-create-passport.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/migrations/20180301011033-create-passport.js -------------------------------------------------------------------------------- /03_one-to-one/models/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/models/index.js -------------------------------------------------------------------------------- /03_one-to-one/models/passport.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/models/passport.js -------------------------------------------------------------------------------- /03_one-to-one/models/user.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/models/user.js -------------------------------------------------------------------------------- /03_one-to-one/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/package.json -------------------------------------------------------------------------------- /03_one-to-one/routes/passports.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/routes/passports.js -------------------------------------------------------------------------------- /03_one-to-one/routes/users.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/routes/users.js -------------------------------------------------------------------------------- /03_one-to-one/server.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/server.js -------------------------------------------------------------------------------- /03_one-to-one/yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/03_one-to-one/yarn.lock -------------------------------------------------------------------------------- /04_many-to-many/.sequelizerc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/.sequelizerc -------------------------------------------------------------------------------- /04_many-to-many/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/README.md -------------------------------------------------------------------------------- /04_many-to-many/bin/www: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/bin/www -------------------------------------------------------------------------------- /04_many-to-many/config/config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/config/config.json -------------------------------------------------------------------------------- /04_many-to-many/controllers/ingredient-controller.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/controllers/ingredient-controller.js -------------------------------------------------------------------------------- /04_many-to-many/controllers/recipe-controller.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/controllers/recipe-controller.js -------------------------------------------------------------------------------- /04_many-to-many/migrations/20180301011032-create-recipe.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/migrations/20180301011032-create-recipe.js -------------------------------------------------------------------------------- /04_many-to-many/migrations/20180301011033-create-ingredient.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/migrations/20180301011033-create-ingredient.js -------------------------------------------------------------------------------- /04_many-to-many/migrations/20180301011034-create-RecipeIngredient.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/migrations/20180301011034-create-RecipeIngredient.js -------------------------------------------------------------------------------- /04_many-to-many/models/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/models/index.js -------------------------------------------------------------------------------- /04_many-to-many/models/ingredient.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/models/ingredient.js -------------------------------------------------------------------------------- /04_many-to-many/models/recipe-ingredient.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/models/recipe-ingredient.js -------------------------------------------------------------------------------- /04_many-to-many/models/recipe.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/models/recipe.js -------------------------------------------------------------------------------- /04_many-to-many/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/package.json -------------------------------------------------------------------------------- /04_many-to-many/routes/ingredients.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/routes/ingredients.js -------------------------------------------------------------------------------- /04_many-to-many/routes/recipes.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/routes/recipes.js -------------------------------------------------------------------------------- /04_many-to-many/server.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/server.js -------------------------------------------------------------------------------- /04_many-to-many/yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/04_many-to-many/yarn.lock -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/williampruden/sequelize-associations/HEAD/README.md --------------------------------------------------------------------------------