From 2d11fdfdadd4b1f566bdbf193468f6f8bf55835e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Gro=C3=9F?= Date: Mon, 7 Aug 2023 16:22:39 +0200 Subject: [PATCH] DB: Add fields for custom profile backgrounds --- .../20230807103447-add_custom_profile_bg.js | 15 +++++++++++++++ models/profile.js | 1 + 2 files changed, 16 insertions(+) create mode 100644 migrations/20230807103447-add_custom_profile_bg.js diff --git a/migrations/20230807103447-add_custom_profile_bg.js b/migrations/20230807103447-add_custom_profile_bg.js new file mode 100644 index 0000000..4509860 --- /dev/null +++ b/migrations/20230807103447-add_custom_profile_bg.js @@ -0,0 +1,15 @@ +'use strict'; + +/** @type {import('sequelize-cli').Migration} */ +module.exports = { + async up (queryInterface, Sequelize) { + await queryInterface.addColumn('Profiles', 'customBackground', { + type: Sequelize.STRING, + allowNull: true + }); + }, + + async down (queryInterface, Sequelize) { + await queryInterface.removeColumn('Profiles', 'customBackground'); + } +}; diff --git a/models/profile.js b/models/profile.js index bbed633..489fd54 100644 --- a/models/profile.js +++ b/models/profile.js @@ -20,6 +20,7 @@ module.exports = (sequelize, DataTypes) => { Profile.init({ userId: DataTypes.INTEGER, customStatus: DataTypes.STRING, + customBackground: DataTypes.STRING, slotOne: DataTypes.INTEGER, slotTwo: DataTypes.INTEGER, slotThree: DataTypes.INTEGER,