improvement: moved vcard parse logic to backend

This commit is contained in:
canove
2020-10-04 14:05:32 -03:00
parent ec9fbee7d3
commit 315dbac175
8 changed files with 175 additions and 68 deletions

View File

@@ -0,0 +1,16 @@
import { QueryInterface, DataTypes } from "sequelize";
module.exports = {
up: (queryInterface: QueryInterface) => {
return queryInterface.addColumn("Messages", "contactId", {
type: DataTypes.INTEGER,
references: { model: "Contacts", key: "id" },
onUpdate: "CASCADE",
onDelete: "CASCADE"
});
},
down: (queryInterface: QueryInterface) => {
return queryInterface.removeColumn("Messages", "contactId");
}
};

View File

@@ -0,0 +1,16 @@
import { QueryInterface, DataTypes } from "sequelize";
module.exports = {
up: (queryInterface: QueryInterface) => {
return queryInterface.addColumn("Messages", "vcardContactId", {
type: DataTypes.INTEGER,
references: { model: "Contacts", key: "id" },
onUpdate: "CASCADE",
onDelete: "CASCADE"
});
},
down: (queryInterface: QueryInterface) => {
return queryInterface.removeColumn("Messages", "vcardContactId");
}
};