Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

687 B
Raw Blame
DROP TABLE IF EXISTS order_shipment;

-- DROP SEQUENCE IF EXISTS order_shipment_order_shipment_id_seq;
-- CREATE SEQUENCE order_shipment_order_shipment_id_seq;


CREATE TABLE order_shipment (
  "order_shipment_id" int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, -- SERIAL PRIMARY KEY
  "order_id" int check ("order_id" > 0) NOT NULL,
  "shipping_method" varchar(191) NOT NULL,
  "tracking_number" varchar(191) NOT NULL,
  "created_at" timestamp(0) NOT NULL DEFAULT now()
  -- PRIMARY KEY("order_shipment_id")
);

CREATE INDEX "order_shipment_order_id" ON order_shipment ("order_id");
-- SELECT setval('order_shipment_order_shipment_id_seq', 0, true); -- last inserted id by sample data