DROP TABLE IF EXISTS option;

-- DROP SEQUENCE IF EXISTS option_option_id_seq;
-- CREATE SEQUENCE option_option_id_seq;

CREATE TABLE "option" (
  "option_id" int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, -- SERIAL PRIMARY KEY
  "type" TEXT NOT NULL,
  "sort_order" INT NOT NULL DEFAULT 0
 -- PRIMARY KEY("option_id", "type")
);

SELECT setval('option_option_id_seq', 14, true); -- last inserted id by sample data
