DROP TABLE IF EXISTS field_group;

-- DROP SEQUENCE IF EXISTS field_group_field_group_id_seq;
-- CREATE SEQUENCE field_group_field_group_id_seq;


CREATE TABLE field_group (
  "field_group_id" int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, -- SERIAL PRIMARY KEY,
  "type" varchar(128) NOT NULL DEFAULT 'post', -- post, product, user, taxonomy item
  "subtype" varchar(128) NOT NULL DEFAULT 'post', -- post, page, product
  "status" smallint NOT NULL DEFAULT 1,
  "sort_order" int NOT NULL DEFAULT 0
  -- PRIMARY KEY("field_group_id")
);

-- SELECT setval('field_group_field_group_id_seq', 0, true); -- last inserted id by sample data
