CC-2977: Never delete files from the database
- Files are marked deleted(file_exists to false) on deletion. - Dirs are marked removed(removed flag to true) on removal of watched folder in a usual way. If dir is unmounted, without being removed from watched list first, it will be marked as not exists(exist flag to false) - Manage Media Folders will show if dirs exist or not( mounted or not) - Playlist builder will show if files exists or not
This commit is contained in:
parent
61c5355e8a
commit
04b48d47cc
16 changed files with 374 additions and 69 deletions
|
@ -28,6 +28,7 @@
|
|||
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
|
||||
<column name="directory" phpName="Directory" type="LONGVARCHAR" required="false"/>
|
||||
<column name="type" phpName="Type" type="VARCHAR" size="255" required="false"/>
|
||||
<column name="exists" phpName="Exists" type="BOOLEAN" required="false" defaultValue="true"/>
|
||||
<column name="removed" phpName="Removed" type="BOOLEAN" required="false" defaultValue="false"/>
|
||||
<unique name="cc_music_dir_unique">
|
||||
<unique-column name="directory"/>
|
||||
|
|
|
@ -42,6 +42,7 @@ CREATE TABLE "cc_music_dirs"
|
|||
"id" serial NOT NULL,
|
||||
"directory" TEXT,
|
||||
"type" VARCHAR(255),
|
||||
"exists" BOOLEAN default 't',
|
||||
"removed" BOOLEAN default 'f',
|
||||
PRIMARY KEY ("id"),
|
||||
CONSTRAINT "cc_music_dir_unique" UNIQUE ("directory")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue