starting on new DB structure, with a new branch, with thoughts in TODO, file_types in tables.sql

This commit is contained in:
2021-01-18 13:19:25 +11:00
parent 0e01b132ab
commit ab3eff4e62
2 changed files with 7 additions and 0 deletions

1
TODO
View File

@@ -86,6 +86,7 @@ PROPOSED CHANGES:
all images with faces, or if we 'reset face_flag' rescan all images all images with faces, or if we 'reset face_flag' rescan all images
TODO: Handle file deletions from file system (remove dangling DIR/FILE combos) -- also when moving to storage_dir, need to reset DIR, but keep FILE data
### UI ### UI

View File

@@ -2,6 +2,12 @@ ALTER DATABASE pa SET timezone TO 'Australia/Victoria';
create table settings( id integer, import_path varchar, last_import_date float, constraint pk_settings_id primary key(id) ); create table settings( id integer, import_path varchar, last_import_date float, constraint pk_settings_id primary key(id) );
create table file_type ( id integer, name varchar(32) unique, constraint pk_file_type_id primary key(id) );
insert into file_type values ( 1, 'Directory' );
insert into file_type values ( 2, 'Image' );
insert into file_type values ( 3, 'Video' );
insert into file_type values ( 4, 'Unknown' );
create table file( id integer, name varchar(128), size_MB integer, type varchar(20), path_prefix varchar(256), hash varchar(34), thumbnail varchar, create table file( id integer, name varchar(128), size_MB integer, type varchar(20), path_prefix varchar(256), hash varchar(34), thumbnail varchar,
constraint pk_photos_id primary key(id) ); constraint pk_photos_id primary key(id) );