Created
November 1, 2020 02:32
-
-
Save mbrown3321/57e87478f0d6d29572f43105a8a164bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
module.exports = { | |
up: async (queryInterface, Sequelize) => { | |
await queryInterface.createTable("uploads", { | |
id: { | |
allowNull: false, | |
autoIncrement: true, | |
primaryKey: true, | |
type: Sequelize.BIGINT | |
}, | |
id: { | |
type: Sequelize.BIGINT | |
}, | |
file_name: { | |
type: Sequelize.STRING | |
}, | |
image: { | |
type: Sequelize.BLOB("tiny") | |
}, | |
createdAt: { | |
allowNull: false, | |
type: Sequelize.DATE | |
}, | |
updatedAt: { | |
allowNull: false, | |
type: Sequelize.DATE | |
} | |
}); | |
}, | |
down: async (queryInterface, Sequelize) => { | |
await queryInterface.dropTable("uploads"); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment