Skip to content

Instantly share code, notes, and snippets.

@mbrown3321
Created November 1, 2020 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbrown3321/57e87478f0d6d29572f43105a8a164bd to your computer and use it in GitHub Desktop.
Save mbrown3321/57e87478f0d6d29572f43105a8a164bd to your computer and use it in GitHub Desktop.
"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