Skip to content

Database for Folder

Rexy Gamaliel requested to merge development_be into main

Added tables:

  • folders(id, user_id, name, is_root, created_on),
  • file_folder(id_file, id_parent), and
  • folder_folder(id_folder, id_parent).

Folder feature:

  • A folder can contain folders and files
  • There's a special folder called root folder, recognized by the TRUE value on the is_root attribute in the folders table
  • Each user is assigned a root folder upon account creation (perlu tambahin di sign up). A root folder has been assigned for each existing user in the SQL query
  • All folders (except root folder) is a child of a folder. Likewise, every files is a child of a folder. This relation is implemented in the file_folder and folder_folder tables

Effect on existing features:

  • Account sign up creates an entry for the root folder in the folders table
  • Home page (or similar pages that previously display all user files) now by default displays folders & files in a particular folder, not all the files owned by a user, unless we need that for some use cases. These pages should now use GetFilesByFolderId instead of GetFiles
  • Menyambung poin di atas, the Home page (or similar pages) displays folders & files in the root folder by default. The user can then navigate through folders as usual

Merge request reports