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

Switch to SQLlite #9

Closed
thinkingserious opened this issue Mar 24, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@thinkingserious
Copy link
Contributor

commented Mar 24, 2016

No description provided.

@georgeyk

This comment has been minimized.

Copy link
Contributor

commented Sep 28, 2017

@thinkingserious I'll take this one for hacktoberfest, ok ?

@georgeyk

This comment has been minimized.

Copy link
Contributor

commented Sep 30, 2017

Is there a problem to use CLEARDB_DATABASE_URL in local environments ?
I could change https://github.com/sendgrid/open-source-library-data-collector/blob/master/db_connector.py#L11-L33 to only handle "database urls".

This will also require to change env_sample to have something like this:

# local mysql
CLEARDB_DATABASE_URL=mysql://user:pass@127.0.0.1:/open-source-external-library-data
# local sqlite3 file
CLEARDB_DATABASE_URL=sqlite:///foo.db
# local sqlite3 in memory
CLEARDB_DATABASE_URL=sqlite://

I think this could be the first PR, since it does not need to support sqlite right away.

To proper support sqlite, data_squema.sql should be updated or use a helper script to create schema for sqlite (the drawback is the schema duplication).

@thinkingserious

This comment has been minimized.

Copy link
Contributor Author

commented Sep 30, 2017

@georgeyk,

I suggest SQLLITE or similar. CLEARDB is a MySQL DB provider that supports Heroku. The code should offer configuration that allows the user to specify which DB they would like to use.

I hope that helps!

With Best Regards,

Elmer

@georgeyk

This comment has been minimized.

Copy link
Contributor

commented Oct 1, 2017

what about DB_URL ?
Generic and don't conflict with DATABASE_URL (heroku)

@thinkingserious

This comment has been minimized.

Copy link
Contributor Author

commented Oct 1, 2017

I was thinking SQLLITE_DB, since a user may want to configure several databases for different needs. For example, perhaps someone would want a MONGO_DB to store certain types of data, SQLLITE_DB for other data and most data in MYSQL_DB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.