-- CreateTable
CREATE TABLE "testing_countries" (
    "id" SERIAL NOT NULL,
    "country_id" INTEGER NOT NULL,
    "enabled" BOOLEAN NOT NULL DEFAULT true,
    "rating" DOUBLE PRECISION DEFAULT 0,
    "capital_lat" DOUBLE PRECISION,
    "capital_lon" DOUBLE PRECISION,
    "tz_offset_min" DOUBLE PRECISION,
    "tz_offset_max" DOUBLE PRECISION,
    "updated_at" TIMESTAMP(3) NOT NULL,

    CONSTRAINT "testing_countries_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "testing_countries_country_id_key" ON "testing_countries"("country_id");

-- CreateIndex
CREATE INDEX "testing_countries_enabled_idx" ON "testing_countries"("enabled");

-- AddForeignKey
ALTER TABLE "testing_countries" ADD CONSTRAINT "testing_countries_country_id_fkey" FOREIGN KEY ("country_id") REFERENCES "countries"("id") ON DELETE CASCADE ON UPDATE CASCADE;
