order_destination

Description

Destination data.

If shop use download sales (see configuration.download), this table no longer be used.

Definition

Column Type Constraint 詳細
shop TEXT PRIMARY KEY Shop ID. (.username)
order_id INTEGER Order ID. (order.id)
fname TEXT NOT NULL First name.
lname TEXT NOT NULL Last name.
zip_code TEXT NOT NULL Zip code.
address1 TEXT NOT NULL Address1.
address2 TEXT Optional. Address2.
city TEXT NOT NULL City.
prefecture INTEGER NOT NULL Prefecture ID. It would be defined in prefecture.rb.
tel TEXT NOT NULL Telephone number.

Related tables

Query

CREATE TABLE order_destination(
shop        TEXT,
order_id    INTEGER,
fname       TEXT     NOT NULL,
lname       TEXT     NOT NULL,
zip_code    TEXT     NOT NULL,
address1    TEXT     NOT NULL,
address2    TEXT,
city        TEXT     NOT NULL,
prefecture  INTEGER  NOT NULL,
tel         TEXT     NOT NULL,
PRIMARY KEY(shop, order_id)
);