// ---------------------------------------------------------------------------
-const LAST_MIGRATION_VERSION = 370
+const LAST_MIGRATION_VERSION = 375
// ---------------------------------------------------------------------------
--- /dev/null
+import * as Sequelize from 'sequelize'
+
+async function up (utils: {
+ transaction: Sequelize.Transaction,
+ queryInterface: Sequelize.QueryInterface,
+ sequelize: Sequelize.Sequelize,
+ db: any
+}): Promise<void> {
+ const data = {
+ type: Sequelize.STRING(1000),
+ allowNull: true,
+ defaultValue: null
+ }
+
+ await utils.queryInterface.changeColumn('account', 'description', data)
+}
+
+function down (options) {
+ throw new Error('Not implemented.')
+}
+
+export {
+ up,
+ down
+}
BeforeDestroy,
BelongsTo,
Column,
- CreatedAt,
+ CreatedAt, DataType,
Default,
DefaultScope,
ForeignKey,
import { UserModel } from './user'
import { AvatarModel } from '../avatar/avatar'
import { VideoPlaylistModel } from '../video/video-playlist'
-import { WEBSERVER } from '../../initializers/constants'
+import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers/constants'
import { Op, Transaction, WhereOptions } from 'sequelize'
export enum ScopeNames {
@AllowNull(true)
@Default(null)
@Is('AccountDescription', value => throwIfNotValid(value, isAccountDescriptionValid, 'description', true))
- @Column
+ @Column(DataType.STRING(CONSTRAINTS_FIELDS.USERS.DESCRIPTION.max))
description: string
@CreatedAt