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

Home server database #39

Closed
ockham opened this issue Dec 24, 2012 · 11 comments
Closed

Home server database #39

ockham opened this issue Dec 24, 2012 · 11 comments

Comments

@ockham
Copy link
Collaborator

ockham commented Dec 24, 2012

Converted from SourceForge issue 3396654, submitted by SourceForge user nobody on 2011-08-22 22:37:16 UTC.

In my home I keep an inventory system in my pantry and a touch screen in my kitchen both connected to a server. It would be nice to have both access the same recipe database on the server. Gourmet would be installed on all systems but only access one recipe database on the server. Adding a recipe on one system would be accessed by all. Also I would be able to generate shopping list from any system and later access, update or print from any of the other systems.

@ockham
Copy link
Collaborator Author

ockham commented Dec 24, 2012

Submitted by SourceForge user rocketman768 on 2012-08-05 17:00:51 UTC.

+1 schappenberg. Just make a GUI option for the location of recipes.db. For syncing, I just made a symbolic link from ~/.gourmet/recipes.db to my Dropbox folder.

@ockham
Copy link
Collaborator Author

ockham commented Dec 24, 2012

Submitted by SourceForge user enfant_terrible on 2012-02-05 01:27:20 UTC.

Good to hear about posgres working!

As the Windows part is off-topic, please refer to this forum thread I've just created:
https://sourceforge.net/projects/grecipe-manager/forums/forum/371767/topic/4998743

@ockham
Copy link
Collaborator Author

ockham commented Dec 24, 2012

Submitted by SourceForge user indymaynard on 2012-02-04 23:26:52 UTC.

Well, after installing python-psycopg2, it seems to work fine. I did run into a problem with the nutritional values, but after closing and restarting, it seemed to work. However, I would love to know if anyone could tell me:

  1. How to run gourmet 0.15.9 in Windows
  2. How to build gourmet 0.15.9 in Windows

@ockham
Copy link
Collaborator Author

ockham commented Dec 24, 2012

Submitted by SourceForge user indymaynard on 2012-02-04 22:27:19 UTC.

I can tell you that MySQL didn't work even after the manual database alteration.

The error returned after that was:

sqlalchemy.exc.InvalidRequestError: VARCHAR requires a length when rendered on MySQL

Fedora always forgets my postgres stuff, so I have to reconfigure before I try. I really want to get this working...

@ockham
Copy link
Collaborator Author

ockham commented Dec 24, 2012

Submitted by SourceForge user enfant_terrible on 2012-02-04 21:57:59 UTC.

I haven't tried postgres yet. If you do, please comment here on the result!

@ockham
Copy link
Collaborator Author

ockham commented Dec 24, 2012

Submitted by SourceForge user indymaynard on 2012-02-04 21:36:34 UTC.

When you say "some backends," does that include postgres? I have yet to try that.

@ockham
Copy link
Collaborator Author

ockham commented Dec 24, 2012

Submitted by SourceForge user enfant_terrible on 2012-01-30 19:02:32 UTC.

I've also tried it out. The problem is that some backends (like MySQL) are "pickier" than others (like SQLite).
To make this work, I will need to change the database layout a bit, which will also require some tweaks in order to ensure backwards compatibility.

If you don't want to wait, you might want to try to modify the database layout manually, as described in this blog post:
http://blog.henrygis.com/2011/02/setting-up-gourmet-recipe-manager-part.html

@ockham
Copy link
Collaborator Author

ockham commented Dec 24, 2012

Submitted by SourceForge user indymaynard on 2012-01-30 03:27:21 UTC.

Sadly, the suggested --database-url command does not work. In my particular case, that gives me this error:

sqlalchemy.exc.OperationalError: (OperationalError) (1170, "BLOB/TEXT column 'ingkey' used in key specification without a key length") '\nCREATE TABLE shopcats (\n\tingkey TEXT NOT NULL, \n\tshopcategory TEXT, \n\tposition INTEGER, \n\tPRIMARY KEY (ingkey)\n)\n\n' ()

I am not a python programmer, nor do I suspect that I will learn it anytime soon, but I messed with the source code a little a year or so back. Whenever I "fixed" one problem, another popped up. It seems as though SQLAlchemy doesn't make it as seamless as I thought it would.

I would love this feature! I have a whole family that is interested in this!

@ockham
Copy link
Collaborator Author

ockham commented Dec 24, 2012

Submitted by SourceForge user enfant_terrible on 2012-01-15 17:29:27 UTC.

@schappenberg: you can already change the location of recipes.db, using the --gourmetdir command line option.
use gourmet --help to see all possible options.

as for server-based database storage, gourmet uses SQLAlchemy -- by default to access a SQLite database, but using the --database-url command line option, you might also succeed using e.g. a MySQL db instead.

@ockham
Copy link
Collaborator Author

ockham commented Dec 24, 2012

Submitted by SourceForge user schappenberg on 2011-12-30 04:57:04 UTC.

i'll give that a +1
As a suggestion, just add an option to change the location of the recipes.db. So i also would have the possibility to manage more recipes.db's e.g. for more than one gourmet users on one PC or to manage soups in a different Database than grilling recipes.

@ockham ockham mentioned this issue Jan 6, 2013
Closed
@ockham
Copy link
Collaborator Author

ockham commented Jan 6, 2013

Splitting this issue into #681 and #682, closing.

@ockham ockham closed this as completed Jan 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant