satisfeet / hoopoe-old

Hoopoe is the REST API service for satisfeet.
1 stars 0 forks source link

replace mongodb as database #46

Open bodokaiser opened 10 years ago

bodokaiser commented 10 years ago

The model data (e.g. Address, Customer, Order and Product) should be stored in postgres and the file data (e.g. Image, Invoice) in S3 with either s3gof3r or goamz/s3.

Regarding the postgres bindings we should first look if we use an ORM or just plain queries. As database driver lib/pq seems to be the first choice. As layer on top I tend to jmoiron/sqlx or maybe jinzhu/gorm.

bodokaiser commented 10 years ago

SQL schemas to use:

address

CREATE TABLE address (
  id serial,
  street text,
  zipcode int(5),
  city text NOT NULL,

  PRIMARY KEY (id)
);

customer

CREATE TABLE customer (
  id serial,
  name text NOT NULL,
  email text NOT NULL,
  company text,

  PRIMARY KEY (id)
);
bodokaiser commented 10 years ago

Update: Use mysql over postgres as there is not many documentation on postgres.