From 73da35cbfaefb60a57cd05a8b099bdeafd45d42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Abadesso?= Date: Fri, 10 Jan 2025 18:03:56 -0300 Subject: [PATCH] refactor: increase network size to 32 characters in the database --- .../20250110194443-increase-network-size.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 db/migrations/20250110194443-increase-network-size.js diff --git a/db/migrations/20250110194443-increase-network-size.js b/db/migrations/20250110194443-increase-network-size.js new file mode 100644 index 00000000..70155912 --- /dev/null +++ b/db/migrations/20250110194443-increase-network-size.js @@ -0,0 +1,18 @@ +'use strict'; + +/** @type {import('sequelize-cli').Migration} */ +module.exports = { + async up (queryInterface, Sequelize) { + await queryInterface.changeColumn('version_data', 'network', { + type: Sequelize.STRING(32), + allowNull: false, + }); + }, + + async down (queryInterface, Sequelize) { + await queryInterface.changeColumn('version_data', 'network', { + type: Sequelize.STRING(8), + allowNull: false, + }); + } +};