Skip to content

armgit / Vvveb

Public Imported from GitHub
0

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

487 B
Raw Blame
DROP TABLE IF EXISTS attribute;

-- DROP SEQUENCE IF EXISTS attribute_attribute_id_seq;
-- CREATE SEQUENCE attribute_attribute_id_seq;

CREATE TABLE "attribute" (
  "attribute_id" int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, -- SERIAL PRIMARY KEY
  "attribute_group_id" int check ("attribute_group_id" >= 0) NOT NULL,
  "sort_order" INT NOT NULL DEFAULT 0
 -- PRIMARY KEY("attribute_id")
);

SELECT setval('attribute_attribute_id_seq', 12, true); -- last inserted id by sample data