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

ORM Models for Inventory #16

Merged
merged 47 commits into from
Aug 13, 2023
Merged

ORM Models for Inventory #16

merged 47 commits into from
Aug 13, 2023

Conversation

lemilonkh
Copy link
Contributor

@lemilonkh lemilonkh commented Jul 31, 2023

  • Fix migrations

  • Fix errors when using sequelize with webpack

  • Replace use of deprecated serverRuntimeConfig with direct usage of process.env

  • Create hello world route /api/v0/

  • Add Node Test Runner (execute with npm run test)

  • Add tests that check uniqueness constraints on City.locode and User.email

  • Implement CRUD API routes for inventory and city

Signed-off-by: Milan Gruner <milangruner@gmail.com>
Signed-off-by: Milan Gruner <milangruner@gmail.com>
Signed-off-by: Milan Gruner <milangruner@gmail.com>
Signed-off-by: Milan Gruner <milangruner@gmail.com>
Signed-off-by: Milan Gruner <milangruner@gmail.com>
Signed-off-by: Milan Gruner <milangruner@gmail.com>
Signed-off-by: Milan Gruner <milangruner@gmail.com>
…th webpack

Had to manually import pg and set it as the dialectModule

Signed-off-by: Milan Gruner <milangruner@gmail.com>
Using env directly is recommended for newer NextJS versions

Signed-off-by: Milan Gruner <milangruner@gmail.com>
Signed-off-by: Milan Gruner <milangruner@gmail.com>
Signed-off-by: Milan Gruner <milangruner@gmail.com>
@lemilonkh lemilonkh self-assigned this Jul 31, 2023
@lemilonkh lemilonkh changed the title WIP: Inventory CRUD routes ORM Models for Inventory Aug 1, 2023
@lemilonkh lemilonkh requested a review from evanp August 1, 2023 13:48
Copy link
Contributor

@evanp evanp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get an error when running the migrations.

== 20230728183114-Init: migrating =======

ERROR: require() of ES Module /Users/evanp/Documents/GitHub/CityCatalyst/app/migrations/20230728183114-Init.js from /Users/evanp/Documents/GitHub/CityCatalyst/app/node_modules/umzug/lib/migration.js not supported.
20230728183114-Init.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
Instead rename 20230728183114-Init.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /Users/evanp/Documents/GitHub/CityCatalyst/app/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).

I'll see if I can fix it.

Signed-off-by: Milan Gruner <milangruner@gmail.com>
Signed-off-by: Milan Gruner <milangruner@gmail.com>
Signed-off-by: Milan Gruner <milangruner@gmail.com>
Signed-off-by: Milan Gruner <milangruner@gmail.com>
Signed-off-by: Milan Gruner <milangruner@gmail.com>
Signed-off-by: Milan Gruner <milangruner@gmail.com>
@evanp evanp merged commit d71848e into develop Aug 13, 2023
@evanp evanp deleted the feature/inventory-crud branch September 8, 2023 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants