let's log requests
This commit is contained in:
parent
bd50b21281
commit
7f528a23ad
3 changed files with 8 additions and 38 deletions
|
|
@ -8,7 +8,8 @@
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"dev-backend": "node --watch src/back/main.js",
|
"dev-backend": "node --watch src/back/main.js",
|
||||||
"dev-database": "docker compose up -d"
|
"dev-database-up": "docker compose up -d",
|
||||||
|
"dev-database-down": "docker compose down"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tailwindcss/vite": "^4.1.7",
|
"@tailwindcss/vite": "^4.1.7",
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,16 @@ module.exports = {
|
||||||
return queryInterface.sequelize.transaction((t) => {
|
return queryInterface.sequelize.transaction((t) => {
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
queryInterface.createTable(
|
queryInterface.createTable(
|
||||||
"hello_world",
|
"received_requests",
|
||||||
{
|
{
|
||||||
first_name: {
|
id: {
|
||||||
type: Sequelize.STRING,
|
type: Sequelize.UUID,
|
||||||
allowNull: false,
|
allowNull: false,
|
||||||
unique: true,
|
unique: true,
|
||||||
primaryKey: true,
|
primaryKey: true,
|
||||||
},
|
},
|
||||||
last_name: {
|
request_body: {
|
||||||
type: Sequelize.STRING,
|
type: Sequelize.JSON,
|
||||||
allowNull: false,
|
allowNull: false,
|
||||||
},
|
},
|
||||||
created_at: {
|
created_at: {
|
||||||
|
|
@ -28,6 +28,6 @@ module.exports = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
down: (queryInterface, Sequelize) => {
|
down: (queryInterface, Sequelize) => {
|
||||||
return queryInterface.dropTable("hello_world");
|
return queryInterface.dropTable("received_requests");
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
up: (queryInterface, Sequelize) => {
|
|
||||||
return queryInterface.sequelize.transaction((t) => {
|
|
||||||
return Promise.all([
|
|
||||||
queryInterface.bulkInsert(
|
|
||||||
"hello_world",
|
|
||||||
[
|
|
||||||
{
|
|
||||||
first_name: "John",
|
|
||||||
last_name: "Doe",
|
|
||||||
created_at: new Date(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
first_name: "Jane",
|
|
||||||
last_name: "Smith",
|
|
||||||
created_at: new Date(),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
{ transaction: t }
|
|
||||||
),
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
down: (queryInterface, Sequelize) => {
|
|
||||||
return queryInterface.bulkDelete(
|
|
||||||
"hello_world"
|
|
||||||
);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue