Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design table structure #1

Open
pjankovsky opened this issue Feb 18, 2019 · 3 comments
Open

Design table structure #1

pjankovsky opened this issue Feb 18, 2019 · 3 comments
Assignees

Comments

@pjankovsky
Copy link
Owner

pjankovsky commented Feb 18, 2019

Need to move from Bolt to an RDB structure. Key/Value is no longer useful and speed isn't an issue.

@pjankovsky pjankovsky self-assigned this Feb 18, 2019
@pjankovsky
Copy link
Owner Author

Existing Bolt buckets:

  1. FileQueue - List of files/folders that are pending or have been processed by the uploader.
  2. State - Was planned to be used for storing backoff api state. UNUSED.

Needed tables:

  1. Files - List of files/folders and if they have been created / mirrored to the gdrive directory.

@pjankovsky
Copy link
Owner Author

pjankovsky commented Feb 18, 2019

While we may only need one table. I want to separate out file info from the metrics. I also want to start capturing and parsing the file from gdrive so I can do more advanced things in the future.

Table: local_file

id parent_id file_type name md5 drive_file_id upload_status updated_at deleted
int PK autoinc int string(1) string string(32) string(64) string datetime boolean

Table: local_file_metric

local_file_id found_at queued_at upload_started_at upload_ended_at upload_retries
int datetime datetime datetime datetime int

Table: drive_file

id parent_id file_type name md5 local_file_id updated_at deleted
string(64) string(64) string(1) string string(32) int datetime boolean

Table: drive_file_metric

drive_file_id found_at
string(64) datetime

@pjankovsky
Copy link
Owner Author

type is a protected word in go. Change it to file_type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant