Member
Member
frankm   2011-02-13, 06:36
#1

hi,

i was just looking at the database and it appears that there are two fields called 'hasMetadata' in the images table. all my images have metadata. with that the first field has always a value of 0 and the second field has a value of 1. is that just my database that has been screwed somewhat or is it just normal ?

with that said, in context ZP_IMAGE, i can call the getImageMetaData() function and retrieve all necessary metadata information.

Member
Member
sbillard   2011-02-13, 22:26
#2

I really do not know how a database can have two identical table fields. Certainly there should be only one. Given that there are two, queries could be "fooled". But fortunately I think we only retrieve this field with a general all fields query, so I guess the two get somehow merged.

Anyway, I would say your database is screwed up. Mine has only one such field (which is as it should be.)

Member
Member
frankm   2011-02-13, 23:14
#3

my mistake... the two fields really have two very similar but different names. the first one is called hasMedadata (with a d) and the second one is hasMetadata (with a t). so i guess queries are not fooled and my db is not screwed. now i'm just wondering what is the hasMedadata field for ?

Member
Member
sbillard   2011-02-14, 03:50
#4

Good question. Not a field that we have now. Maybe for "health care" data

Member
Member
frankm   2011-02-14, 05:29
#5

looks like the field is created and never used. i "grepped" it on the latest nightly build and here is the output:

setup.php:1618: hasMedadata int(1) DEFAULT 0,

nothing is really done after that so it is not a big issue.

Administrator
Administrator
acrylian   2011-02-14, 10:17
#6

Could be a sneaked in typo...

Member
Member
sbillard   2011-02-14, 19:02
#7

Ok, that was a typo. You can delete the field. Fortunately the upgrade process made sure the proper field was there.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.