Increase bio char limit
This commit is contained in:
parent
bd11dabf89
commit
4af3b96746
4 changed files with 17 additions and 4 deletions
13
packages/backend/migration/1709773838671-increaseBioLimit.js
Normal file
13
packages/backend/migration/1709773838671-increaseBioLimit.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
|
||||||
|
export class IncreaseBioLimit1709773838671 {
|
||||||
|
name = "IncreaseBioLimit1709773838671";
|
||||||
|
|
||||||
|
async up(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE user_profile ALTER COLUMN description TYPE text;`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async down(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE user_profile ALTER COLUMN description TYPE varchar(2048) USING left(description, 2048);`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -51,7 +51,7 @@ import type { ApImageService } from './ApImageService.js';
|
||||||
import type { IActor, IObject } from '../type.js';
|
import type { IActor, IObject } from '../type.js';
|
||||||
|
|
||||||
const nameLength = 128;
|
const nameLength = 128;
|
||||||
const summaryLength = 2048;
|
const summaryLength = 65536;
|
||||||
|
|
||||||
type Field = Record<'name' | 'value', string>;
|
type Field = Record<'name' | 'value', string>;
|
||||||
|
|
||||||
|
|
|
@ -339,7 +339,7 @@ export type MiPartialRemoteUser = Partial<MiUser> & {
|
||||||
export const localUsernameSchema = { type: 'string', pattern: /^\w{1,20}$/.toString().slice(1, -1) } as const;
|
export const localUsernameSchema = { type: 'string', pattern: /^\w{1,20}$/.toString().slice(1, -1) } as const;
|
||||||
export const passwordSchema = { type: 'string', minLength: 1 } as const;
|
export const passwordSchema = { type: 'string', minLength: 1 } as const;
|
||||||
export const nameSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
|
export const nameSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
|
||||||
export const descriptionSchema = { type: 'string', minLength: 1, maxLength: 1500 } as const;
|
export const descriptionSchema = { type: 'string', minLength: 1, maxLength: 20000 } as const;
|
||||||
export const locationSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
|
export const locationSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
|
||||||
export const listenbrainzSchema = { type: "string", minLength: 1, maxLength: 128 } as const;
|
export const listenbrainzSchema = { type: "string", minLength: 1, maxLength: 128 } as const;
|
||||||
export const birthdaySchema = { type: 'string', pattern: /^([0-9]{4})-([0-9]{2})-([0-9]{2})$/.toString().slice(1, -1) } as const;
|
export const birthdaySchema = { type: 'string', pattern: /^([0-9]{4})-([0-9]{2})-([0-9]{2})$/.toString().slice(1, -1) } as const;
|
||||||
|
|
|
@ -43,8 +43,8 @@ export class MiUserProfile {
|
||||||
})
|
})
|
||||||
public listenbrainz: string | null;
|
public listenbrainz: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column('text', {
|
||||||
length: 2048, nullable: true,
|
nullable: true,
|
||||||
comment: 'The description (bio) of the User.',
|
comment: 'The description (bio) of the User.',
|
||||||
})
|
})
|
||||||
public description: string | null;
|
public description: string | null;
|
||||||
|
|
Loading…
Reference in a new issue