CREATE SEQUENCE IF NOT EXISTS public.app_activity_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
CREATE TABLE "app_activity" (
"id" BIGINT NOT NULL DEFAULT nextval('app_activity_id_seq'::regclass),
"date" TIMESTAMP NOT NULL,
"type" TEXT NOT NULL,
"area" TEXT NOT NULL,
"count" INTEGER NOT NULL,
PRIMARY KEY ("id")
);
CREATE INDEX "app_activity_date_index" ON "app_activity" USING btree ("date");
INSERT INTO "app_activity" ("id", "date", "type", "area", "count") VALUES
(1, '2021-08-17 00:00:00', 'picagens', 'Lactogal - Prod. Alimentares', 1),
(2, '2021-08-17 00:00:00', 'ferias_contingentes', 'Lactogal - Prod. Alimentares', 1),
(3, '2021-08-17 00:00:00', 'oportunidades', 'Lactogal - Prod. Alimentares', 2),
(4, '2021-08-17 00:00:00', 'ferias_contingentes', 'Sistemas de Informação', 2);
SELECT * FROM "app_activity";