我正在使用“ rake db:migrate”并得到以下错误消息: 请帮我解决这个问题:
+ (NSString *)urlToMIME:(NSURL *)url {
CFStringRef fileExtension = (__bridge CFStringRef)[url pathExtension];
CFStringRef UTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, fileExtension, NULL);
CFStringRef MIMEType = UTTypeCopyPreferredTagWithClass(UTI, kUTTagClassMIMEType);
CFRelease(UTI);
return (__bridge_transfer NSString *)MIMEType;
}
答案 0 :(得分:2)
您在db/migrate
目录中的迁移都应继承自ActiveRecord::Migration[5.2]
,而不是ActiveRecord::Migration