Skip to content

armgit / Vvveb

Public Imported from GitHub
0

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

596 B
Raw Blame
DROP TABLE IF EXISTS product_points;

-- DROP SEQUENCE IF EXISTS product_points_product_points_id_seq;
-- CREATE SEQUENCE product_points_product_points_id_seq;


CREATE TABLE product_points (
  "product_points_id" int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, -- SERIAL PRIMARY KEY
  "product_id" int check ("product_id" > 0) NOT NULL DEFAULT 0,
  "user_group_id" int check ("user_group_id" > 0) NOT NULL DEFAULT 0,
  "points" int NOT NULL DEFAULT 0
  -- PRIMARY KEY("product_points_id")
);

SELECT setval('product_points_product_points_id_seq', 11, true); -- last inserted id by sample data