DROP TABLE IF EXISTS taxonomy;

-- DROP SEQUENCE IF EXISTS taxonomy_taxonomy_id_seq;
-- CREATE SEQUENCE taxonomy_taxonomy_id_seq;


CREATE TABLE taxonomy (
  "taxonomy_id" int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, -- SERIAL PRIMARY KEY
  "name" varchar(191) NOT NULL DEFAULT '',
  "post_type" varchar(191) NOT NULL DEFAULT '',
  "type" varchar(50) NOT NULL DEFAULT 'categories',
  "site_id" smallint NOT NULL DEFAULT 0
  -- PRIMARY KEY("taxonomy_id")
);

CREATE INDEX "taxonomy_id" ON taxonomy ("taxonomy_id");
SELECT setval('taxonomy_taxonomy_id_seq', 5, true); -- last inserted id by sample data
