fix(plugin-file-manager): fix migration and add test cases (#6288) (#6293)

* fix(plugin-file-manager): fix migration and add test cases

* fix(plugin-file-manager): fix test case fails for mysql

* fix(plugin-file-manager): fix test cases

* fix(plugin-file-manager): change migration name
This commit is contained in:
Junyi 2025-02-25 23:29:02 +08:00 committed by GitHub
parent aa8b98d615
commit 80633ce079
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -115,7 +115,7 @@ export class FileCollectionTemplate extends CollectionTemplate {
// 用于预览
{
interface: 'url',
type: 'string',
type: 'text',
name: 'preview',
field: 'url', // 直接引用 url 字段
deletable: false,

View File

@ -8,7 +8,7 @@
*/
import { MockServer, createMockServer } from '@nocobase/test';
import Migration from '../../migrations/20250225112112-increase-url-length';
import Migration from '../../migrations/20250225225034-increase-url-length';
import PluginCollectionManagerServer from '../../server';
describe('file-manager > migrations', () => {

View File

@ -52,7 +52,7 @@ export default class extends Migration {
await FieldRepo.update({
filter: {
collectionName: collection.name,
name: ['url', 'path'],
name: ['url', 'path', 'preview'],
},
values: {
type: 'text',