origintrail-node
Version:
OriginTrail Node - Decentralized Knowledge Graph Node Library
31 lines (30 loc) • 865 B
JavaScript
export async function up({ context: { queryInterface, Sequelize } }) {
await queryInterface.createTable('finality', {
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true,
},
operation_id: {
type: Sequelize.UUID,
allowNull: false,
},
status: {
allowNull: false,
type: Sequelize.STRING,
},
created_at: {
allowNull: false,
type: Sequelize.DATE,
defaultValue: Sequelize.literal('NOW()'),
},
updated_at: {
allowNull: false,
type: Sequelize.DATE,
defaultValue: Sequelize.literal('NOW()'),
},
});
}
export async function down({ context: { queryInterface } }) {
await queryInterface.dropTable('finality');
}