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 .",
|
||||
"preview": "vite preview",
|
||||
"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": {
|
||||
"@tailwindcss/vite": "^4.1.7",
|
||||
|
|
|
|||
|
|
@ -5,16 +5,16 @@ module.exports = {
|
|||
return queryInterface.sequelize.transaction((t) => {
|
||||
return Promise.all([
|
||||
queryInterface.createTable(
|
||||
"hello_world",
|
||||
"received_requests",
|
||||
{
|
||||
first_name: {
|
||||
type: Sequelize.STRING,
|
||||
id: {
|
||||
type: Sequelize.UUID,
|
||||
allowNull: false,
|
||||
unique: true,
|
||||
primaryKey: true,
|
||||
},
|
||||
last_name: {
|
||||
type: Sequelize.STRING,
|
||||
request_body: {
|
||||
type: Sequelize.JSON,
|
||||
allowNull: false,
|
||||
},
|
||||
created_at: {
|
||||
|
|
@ -28,6 +28,6 @@ module.exports = {
|
|||
});
|
||||
},
|
||||
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