Open bodokaiser opened 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)
);
Update: Use mysql over postgres as there is not many documentation on postgres.
The model data (e.g.
Address
,Customer
,Order
andProduct
) 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.