Extending ActivityWatch to work with more types of databases

Hello,

I would like to extend the server code to accept more databases such as Oracle and MySQL which will be in a centralized server.

I can realize that I will have to extend the class AbstractStorage with the new OracleStorageClass and MySQLStorageClass, however, after extending this where should I configure that I want one of this classes as default instead of SQLite.

Best regards,
Gerardo Orellana

That would be really cool to see, but considering that how little people have requested to be able to use a custom server rather than SQLite I’m not sure if it’s worth it for us to merge such code into the master branch considering the increased maintenance of such code.

If you do implement it however I’d be happy with answering questions if you have any!

Keep in mind however that we will replace aw-server with aw-server-rust in the not so distant future, so if you write it in python now you might have to rewrite it in rust later if you want to stay on the latest version.

Hi Johan, thank you for your response, I succeeded in creating the files that can redirect to a different database such as mysql and oracle, now I want to check how can I create a Windows executable as the released APIs I’ve seen, what is the procedure to do this?

There is currently no good guide for building in Windows, but you might find some help from these pages in the docs (as well as reading the .travis.yml file in the root of the activitywatch repo):