Query
CREATE TABLE "insights_by_period" (
"id" integer PRIMARY KEY NOT NULL,
"metaId" integer NOT NULL,
"type" integer NOT NULL,
"value" bigint NOT NULL,
"periodUnit" integer NOT NULL,
"periodStart" datetime(0) DEFAULT (CURRENT_TIMESTAMP),
CONSTRAINT "FK_e8881f2214df046dc2740260fe8" FOREIGN KEY ("metaId") REFERENCES "insights_metadata" ("metaId") ON DELETE CASCADE
)