CREATE TABLE roles (
	id serial4 NOT NULL,
	"name" varchar(50) NOT NULL,
	created_by int4 NULL,
	updated_by int4 NULL,
	created_at timestamp DEFAULT now() NULL,
	updated_at timestamp DEFAULT now() NULL,
	deleted_at timestamp NULL,
	CONSTRAINT roles_pkey PRIMARY KEY (id)
);
CREATE UNIQUE INDEX roles_name_unique_not_deleted ON roles(name) WHERE deleted_at IS NULL;

INSERT INTO roles (name,created_by,updated_by) VALUES ('superadmin', 1, 1), ('admin', 1, 1), ('user', 1, 1), ('hr', 1, 1);