"use strict";
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable("search_queries", {
id: {
allowNull: false,
primaryKey: true,
type: Sequelize.UUID,
},
userId: {
references: {
model: "users",
teamId: {
model: "teams",
source: {
type: Sequelize.ENUM("slack", "app", "api"),
query: {
type: Sequelize.STRING,
results: {
type: Sequelize.INTEGER,
createdAt: {
type: Sequelize.DATE,
});
down: async (queryInterface, Sequelize) => {
await queryInterface.dropTable("search_queries");
};