DROP TABLE IF EXISTS site;

-- DROP SEQUENCE IF EXISTS site_site_id_seq;
-- CREATE SEQUENCE site_site_id_seq;

CREATE TABLE site (
  "site_id" smallint PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, -- SERIAL PRIMARY KEY,
  "name" varchar(191) NOT NULL,
  "settings" text DEFAULT NULL
  -- PRIMARY KEY("site_id")
);

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