should be file_managed, not file

CommentFileSizeAuthor
#9 970002.patch1.54 KBeclipsegc
#7 970002.patch762 byteseclipsegc
#1 970002.patch396 byteseclipsegc

Comments

eclipsegc’s picture

Assigned: Unassigned » eclipsegc
StatusFileSize
new396 bytes

Using git for this since it's kind to me than CVS, hopefully this patch is fine.

eclipsegc’s picture

Status: Active » Needs review
yched’s picture

Status: Needs review » Reviewed & tested by the community

True.

effulgentsia’s picture

Version: 7.0-beta2 » 7.x-dev
Component: field system » file.module
Status: Reviewed & tested by the community » Needs work

Nice catch. This looks correct, but columns.fid.description also needs to be updated. Looks like image_field_schema() and taxonomy_field_schema() also need a 'foreign keys' entry. I'll leave that up to you whether to roll those into this patch, or create separate issues for them.

eclipsegc’s picture

Version: 7.x-dev » 7.0-beta2
Component: file.module » field system
Status: Needs work » Needs review

I already filed a separate issue for taxonomy.

#970016: taxonomy_field_schema lacks any foreign key support

Will look into image, and put together another patch for file to fix the description.

eclipsegc’s picture

Status: Needs review » Needs work

sorry about that

eclipsegc’s picture

Status: Needs work » Needs review
StatusFileSize
new762 bytes

OK, hopefully this makes everyone happier.

mlncn’s picture

Status: Needs review » Reviewed & tested by the community

Very nice. Schema correctness++

eclipsegc’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.54 KB

This should probably include the image field foreign keys as well.

yched’s picture

Status: Needs review » Reviewed & tested by the community

Thanks !

webchick’s picture

Version: 7.0-beta2 » 7.x-dev
Status: Reviewed & tested by the community » Needs work

Change to schema means we need an upgrade path, no?

webchick’s picture

Status: Needs work » Fixed

Actually, in discussing this more with chx, an update function here is unnecessary. No core db engines, nor any of the ones we could find in contrib, actually put FK information into the database itself, so updating the PHP here should be sufficient.

Committed to HEAD.

gábor hojtsy’s picture

Status: Fixed » Needs work

Looks like even though FK is not put into the database, descriptions are (at least with MySQL), so this needs an update function.

  • webchick committed 0222fa7 on 8.3.x
    #970002 by EclipseGc: Fixed file field foreign key table is incorrect
    
    

  • webchick committed 0222fa7 on 8.3.x
    #970002 by EclipseGc: Fixed file field foreign key table is incorrect
    
    

  • webchick committed 0222fa7 on 8.4.x
    #970002 by EclipseGc: Fixed file field foreign key table is incorrect
    
    

  • webchick committed 0222fa7 on 8.4.x
    #970002 by EclipseGc: Fixed file field foreign key table is incorrect
    
    

  • webchick committed 0222fa7 on 9.1.x
    #970002 by EclipseGc: Fixed file field foreign key table is incorrect
    
    

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.