Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joins with knex complete #12

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6d992ca
create database configuration
kchia Nov 30, 2020
82f5e06
initialize a Knex instance
kchia Nov 30, 2020
1e74382
perform database migrations
kchia Nov 30, 2020
00d3dab
cascade deletes in migrations
kchia Dec 1, 2020
4b48274
feat(server.js): add automatic migration
dalelotts Mar 3, 2021
6df3b1b
feat: include dropColumn
dalelotts Mar 8, 2021
6f0d104
style: run prettier on migrations
dalelotts Apr 14, 2021
bd0db3e
add seed scripts
kchia Nov 30, 2020
b970b7b
create CRUD functionality
kchia Dec 1, 2020
e861f29
fix updateSupplierById query
kchia Dec 1, 2020
d8ceb80
feat: add create api validation
kchia Jan 28, 2021
53a6738
move supplierExists function down for consistency
kchia Jan 28, 2021
cd89dea
validate :productId with regex
kchia Jan 29, 2021
889beaa
fix: make update a full update, not patch
dalelotts Mar 20, 2021
e5368e6
fix: add .catch(next) to each knex promise
dalelotts Apr 14, 2021
e5a1ac9
style: run prettier on code
dalelotts Apr 14, 2021
0485d4c
fix(suppliers): export destroy as delete
dalelotts Apr 14, 2021
be04b1c
refactor(suppliers): simplify delete implementation
dalelotts Apr 16, 2021
ae709d8
refactor controllers to use async await
kchia Dec 1, 2020
025a39b
feat: add create api validation
kchia Jan 28, 2021
985088a
feat: add asyncErrorBoundary
dalelotts Feb 28, 2021
ba7f521
feat: use const where appropriate
dalelotts Feb 28, 2021
4bd71f0
fix: export suppliers controller destroy as delete
dalelotts Apr 14, 2021
19c3d60
style: run prettier on code
dalelotts Apr 14, 2021
f154f66
update aggregate controllers
kchia Jan 28, 2021
0e89a73
validate :productId with regex
kchia Jan 29, 2021
0178e11
use dashes instead of underscores in url path
kchia Feb 1, 2021
33dd956
style: run prettier on code
dalelotts Apr 14, 2021
ee90b36
add join base queries and query builder functions
kchia Dec 2, 2020
87b6c05
feat: add mapProperties
dalelotts Mar 20, 2021
0832448
Fix map-properties import.
gabrielsanchez Apr 13, 2021
4640a05
fix: remove dead code from products service
dalelotts Apr 14, 2021
0257902
fix(products): change product.category mapping to include category_ p…
dalelotts Apr 15, 2021
735e64d
fix typo
kchia Jun 21, 2021
f735202
Merge pull request #6 from Thinkful-Ed/joins-patch
summerofgeorge Jun 30, 2021
178a61a
Update knexfile.js
CollinDDD Nov 24, 2023
1d35feb
Merge branch 'main' into joins-with-knex-complete
CollinDDD Nov 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions knexfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const path = require("path");
require("dotenv").config();
const { DATABASE_URL } = process.env;

module.exports = {
development: {
client: "postgresql",
connection: DATABASE_URL,
migrations: {
directory: path.join(__dirname, "src", "db", "migrations"),
},
seeds: {
directory: path.join(__dirname, "src", "db", "seeds"),
},
},
production: {
client: "postgresql",
connection: DATABASE_URL,
migrations: {
directory: path.join(__dirname, "src", "db", "migrations"),
},
seeds: {
directory: path.join(__dirname, "src", "db", "seeds"),
},
},
};
Loading