-
Notifications
You must be signed in to change notification settings - Fork 79
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
Refactor the code to make it easier to support multiple db backends in the future. #350
Conversation
ca5227e
to
5b26a4f
Compare
1c28d39
to
1212282
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a problem. Running migrations manually the old way anymore. We have to cd into the new folder to run migrations. It also generates schema in a different location. Can you actually try it and update the readme? Also please add test plan.
a286c76
to
2c60fe2
Compare
Tested and added one line in README. |
80df6f9
to
b4b3b92
Compare
rust/processor/src/db/common/mod.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make this pub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command should be run inside src/db/postgres/
rust/processor/src/db/mod.rs
Outdated
@@ -0,0 +1 @@ | |||
pub(crate) mod common; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub again, no? otherwise how will SDK use any of this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Restructure the directories.
Rename several variables to remove "Pg".
Remove some unused methods.
Tested on the local machine, verified both manually running migration and running migration through rust code can work.
Instructions
cd
into the database folder you use undersrc/db/
(e.g.src/db/postgres
), then run it.