DocNow / diffengine

track changes to the news, where news is anything with an RSS feed
MIT License
177 stars 30 forks source link

Configurable database #83

Closed nahuelhds closed 4 years ago

nahuelhds commented 4 years ago

Now the database connection is handled with the db property directly and using URL database connections. If no db prop is defined, the value sqlite:///diffengine.db is used in order to maintain compatibility.

In order for this to work with PostgreSQL I've added psycopg2-binary==2.8.5 package. So, basically, with this feature the project has "native" support for Sqlite and PostgreSql. If any other engine is desired, then the proper package needs to be installed (MySQL or any other) and of course the proper database url string to be set as indicated in the peewee docs

~The postgre configuration requires using ?autorollback=true at the end of the database url, in order to avoiding unwanted errors~ These ones were because of the emailed column that my schema was missing after the changes in #77.

I've updated the chromedriver in Travis CI in the PR #84 and I've cherry picked those commits for the CI to pass here too.

Non related

nahuelhds commented 4 years ago

@edsu this one is ready to be merged too!