-- CreateTable

CREATE TABLE "component" ("name" VARCHAR(128) NOT NULL,
                                              CONSTRAINT "component_pkey" PRIMARY KEY ("name"));

-- CreateTable

CREATE TABLE "component_version" ("component_name" VARCHAR(128) NOT NULL,
                                                                "version" VARCHAR(128) NOT NULL,
                                                                                       CONSTRAINT "component_version_pkey" PRIMARY KEY ("component_name",
                                                                                                                                        "version"));

-- AddForeignKey

ALTER TABLE "component_version" ADD CONSTRAINT "component_version_component_name_fkey"
FOREIGN KEY ("component_name") REFERENCES "component"("name") ON
DELETE CASCADE ON
UPDATE CASCADE;

