UNPKG

@selldone/clone-sheet

Version:

A web-based database exploration and visualization tool

40 lines (35 loc) 943 B
"use strict"; module.exports = { up: async (queryInterface, Sequelize) => { await queryInterface.createTable("key_values", { id: { type: Sequelize.INTEGER.UNSIGNED, autoIncrement: true, primaryKey: true, }, key: { type: Sequelize.STRING(255), allowNull: false, unique: true, }, value: { type: Sequelize.TEXT("long"), allowNull: true, }, created_at: { type: Sequelize.DATE, allowNull: true, defaultValue: Sequelize.literal("CURRENT_TIMESTAMP"), }, updated_at: { type: Sequelize.DATE, allowNull: true, defaultValue: Sequelize.literal("CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"), }, }); await queryInterface.addIndex("key_values", ["key"]); }, down: async (queryInterface, Sequelize) => { await queryInterface.dropTable("key_values"); }, };