I want to do a simple versioning system but i don't have ideas on how to structure my datas, and my code.
Here is a short example:
- User logs in
- User has two options when uploading a file:
- Submit a new file
- Submit a new version of a file
Users should be able to see the tree. (the different version) The tree can only be up to 2 levels:
|
|--File_A_0
\--File_A_1
\--File_A_2
\--File_A_3
\--File_A_4
There are also 2 types of file, a final (which is the latest approved version) and a draft version (which the latest uploaded file) The file will be physically stored on the server. Each files are owned by a user (or more) and only one group.
Edit: Groups represent a group of document, document could only be owned by ONE group at once. Users do NOT depend on groups.
Begin edit:
Here is what i did, but it is not really efficient !
id_article | relative_group_id | id_group | title | submited | date | abstract | reference | draft_version | count | status
id_draft | id_file | version | date
But it's difficult to manage, to extend. I think it's because the group paramater...
End edit
So the questions are:
- How can i schematize my database ?
- What kind of infos should be usefull to version this work ?
- What kind of structure for the folders, files ?
- What kind of tips, hints do you have to do this kind of work ?
(The application is developped with PHP and Zend Framework, database should be mysql or postgresql)