Announcement

  •  » Engine
  •  » Uniqueness of 'file' field in DB

#1 2023-11-19 14:50:55

Criss
Former Piwigo Team
Calvi
2008-03-31
95

Uniqueness of 'file' field in DB

Hello,

In order to fit my needs, I'd like to know if the filed 'file' in the 'images' table has to be unique.
The DB does not have a unique index, so in it possible that in some use cases this field has the same value on several rows ?
By the way, same question  for the "path" filed

Criss


Signup and get your Piwigo photo gallery automatically installed and hosted. Help us to beta test it !

Offline

 

#2 2023-11-20 14:13:25

erAck
Only trying to help
2015-09-06
2075

Re: Uniqueness of 'file' field in DB

The concatenation of path+file has to be unique (as you can't have two identically named files in the same directory). So yes, each path and file columns don't have to have unique values.


Running Piwigo at https://erack.net/gallery/

Offline

 
  •  » Engine
  •  » Uniqueness of 'file' field in DB

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact