mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-09 10:51:37 +00:00
22 lines
No EOL
692 B
JavaScript
22 lines
No EOL
692 B
JavaScript
const { DataTypes } = require('sequelize')
|
|
|
|
async function up({ context: { queryInterface, logger } }) {
|
|
logger.info('[Migration] Adding displayName column to users table')
|
|
|
|
await queryInterface.addColumn('users', 'displayName', {
|
|
type: DataTypes.STRING,
|
|
allowNull: true
|
|
})
|
|
|
|
logger.info('[Migration] Successfully added displayName column to users table')
|
|
}
|
|
|
|
async function down({ context: { queryInterface, logger } }) {
|
|
logger.info('[Migration] Removing displayName column from users table')
|
|
|
|
await queryInterface.removeColumn('users', 'displayName')
|
|
|
|
logger.info('[Migration] Successfully removed displayName column from users table')
|
|
}
|
|
|
|
module.exports = { up, down }
|