drop table entity;

create table entity(
   id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
   creation_ts TIMESTAMPTZ NOT NULL DEFAULT now(),
   name varchar(100) NOT NULL,
   group_p BOOLEAN NOT NULL,
   geo_offset BIGINT,
   --private_key VARCHAR(300) NOT NULL,
   public_key VARCHAR(300) NOT NULL,
   expiration DATE


);

drop table group_member;

create table group_member(
   group_id INT,
   person_id INT,
   role VARCHAR(10),
   PRIMARY KEY (group_id,person_id)
);

drop table property;

create table property(
   id INT NOT NULL,
   property_name VARCHAR(100)
);
