DROP TABLE IF EXISTS user_group;

-- DROP SEQUENCE IF EXISTS user_group_user_group_id_seq;
-- CREATE SEQUENCE user_group_user_group_id_seq;


CREATE TABLE user_group (
  "user_group_id" int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, -- SERIAL PRIMARY KEY
  "status" int NOT NULL,
  "sort_order" int NOT NULL DEFAULT 0
  -- PRIMARY KEY("user_group_id")
);

SELECT setval('user_group_user_group_id_seq', 1, true); -- last inserted id by sample data