Skip to content

Commit

Permalink
Criado as migration para inserção na Tabela Queue dos campos ``…
Browse files Browse the repository at this point in the history
…`startWork```, ```endWork``` e ```absenceMessage```
  • Loading branch information
rtenorioh authored Jul 1, 2022
1 parent 9c92276 commit ad5fced
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ module.exports = {
greetingMessage: {
type: DataTypes.TEXT
},
startWork: {
type: DataTypes.STRING
},
endWork: {
type: DataTypes.STRING
},
absenceMessage: {
type: DataTypes.TEXT
},
createdAt: {
type: DataTypes.DATE,
allowNull: false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { QueryInterface, DataTypes } from "sequelize";

module.exports = {
up: (queryInterface: QueryInterface) => {
return queryInterface.addColumn("Queues", "startWork", {
type: DataTypes.STRING,
allowNull: true,
});
},

down: (queryInterface: QueryInterface) => {
return queryInterface.removeColumn("Queues", "startWork");
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { QueryInterface, DataTypes } from "sequelize";

module.exports = {
up: (queryInterface: QueryInterface) => {
return queryInterface.addColumn("Queues", "endWork", {
type: DataTypes.STRING,
allowNull: true,
});
},

down: (queryInterface: QueryInterface) => {
return queryInterface.removeColumn("Queues", "endWork");
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { QueryInterface, DataTypes } from "sequelize";

module.exports = {
up: (queryInterface: QueryInterface) => {
return queryInterface.addColumn("Queues", "absenceMessage", {
type: DataTypes.TEXT,
allowNull: true,
});
},

down: (queryInterface: QueryInterface) => {
return queryInterface.removeColumn("Queues", "absenceMessage");
}
};

0 comments on commit ad5fced

Please sign in to comment.