Bot releases are hidden (Show)
This release includes the following improvements:
Published by udovin 5 months ago
This release includes the following improvements:
To fix issues please do the following steps:
BEGIN;
-- Add solution kind column.
ALTER TABLE "solve_solution" ADD COLUMN "kind" bigint NOT NULL DEFAULT 1;
ALTER TABLE "solve_solution" ALTER COLUMN "kind" DROP DEFAULT;
ALTER TABLE "solve_solution_event" ADD COLUMN "kind" bigint NOT NULL DEFAULT 1;
ALTER TABLE "solve_solution_event" ALTER COLUMN "kind" DROP DEFAULT;
-- Make solution id = solution_id.
UPDATE "solve_contest_solution" SET "id" = "solution_id" + 1000000000;
UPDATE "solve_contest_solution" SET "id" = "id" - 1000000000;
UPDATE "solve_contest_solution_event" AS new SET "id" = (SELECT "solution_id" FROM "solve_contest_solution_event" AS old WHERE old."id" = new."id" AND old."event_kind" != 2 LIMIT 1);
ALTER TABLE "solve_contest_solution" DROP COLUMN "solution_id";
ALTER TABLE "solve_contest_solution_event" DROP COLUMN "solution_id";
ALTER TABLE "solve_contest_solution" ADD CONSTRAINT "solve_contest_solution_id_fkey" FOREIGN KEY ("id") REFERENCES "solve_solution" ("id");
ALTER TABLE "solve_contest_solution" ALTER COLUMN "id" DROP DEFAULT;
DROP SEQUENCE "solve_contest_solution_id_seq";
-- Make user id = account_id.
UPDATE "solve_user" SET "id" = "account_id" + 1000000000;
UPDATE "solve_user" SET "id" = "id" - 1000000000;
UPDATE "solve_user_event" AS new SET "id" = (SELECT "account_id" FROM "solve_user_event" AS old WHERE old."id" = new."id" AND old."event_kind" != 2 LIMIT 1);
ALTER TABLE "solve_user" DROP COLUMN "account_id";
ALTER TABLE "solve_user_event" DROP COLUMN "account_id";
ALTER TABLE "solve_user" ADD CONSTRAINT "solve_user_id_fkey" FOREIGN KEY ("id") REFERENCES "solve_account" ("id");
ALTER TABLE "solve_user" ALTER COLUMN "id" DROP DEFAULT;
DROP SEQUENCE "solve_user_id_seq";
-- Make scope id = account_id.
ALTER TABLE "solve_scope_user" DROP CONSTRAINT "solve_scope_user_scope_id_fkey";
UPDATE "solve_scope_user" AS new SET "scope_id" = (SELECT "account_id" FROM "solve_scope" AS old WHERE old."id" = new."scope_id");
UPDATE "solve_scope_user_event" AS new SET "scope_id" = (SELECT "account_id" FROM "solve_scope_event" AS old WHERE old."id" = new."scope_id" AND old."event_kind" != 2 LIMIT 1) WHERE new."event_kind" != 2;
UPDATE "solve_scope" SET "id" = "account_id" + 1000000000;
UPDATE "solve_scope" SET "id" = "id" - 1000000000;
UPDATE "solve_scope_event" AS new SET "id" = (SELECT "account_id" FROM "solve_scope_event" AS old WHERE old."id" = new."id" AND old."event_kind" != 2 LIMIT 1);
ALTER TABLE "solve_scope" DROP COLUMN "account_id";
ALTER TABLE "solve_scope_event" DROP COLUMN "account_id";
ALTER TABLE "solve_scope" ADD CONSTRAINT "solve_scope_id_fkey" FOREIGN KEY ("id") REFERENCES "solve_account" ("id");
ALTER TABLE "solve_scope" ALTER COLUMN "id" DROP DEFAULT;
DROP SEQUENCE "solve_scope_id_seq";
ALTER TABLE "solve_scope_user" ADD CONSTRAINT "solve_scope_user_scope_id_fkey" FOREIGN KEY ("scope_id") REFERENCES "solve_scope" ("id");
-- Make scope_user id = account_id.
UPDATE "solve_scope_user" SET "id" = "account_id" + 1000000000;
UPDATE "solve_scope_user" SET "id" = "id" - 1000000000;
UPDATE "solve_scope_user_event" AS new SET "id" = (SELECT "account_id" FROM "solve_scope_user_event" AS old WHERE old."id" = new."id" AND old."event_kind" != 2 LIMIT 1);
ALTER TABLE "solve_scope_user" DROP COLUMN "account_id";
ALTER TABLE "solve_scope_user_event" DROP COLUMN "account_id";
ALTER TABLE "solve_scope_user" ADD CONSTRAINT "solve_scope_user_id_fkey" FOREIGN KEY ("id") REFERENCES "solve_account" ("id");
ALTER TABLE "solve_scope_user" ALTER COLUMN "id" DROP DEFAULT;
DROP SEQUENCE "solve_scope_user_id_seq";
-- Drop group tables for recreation from migration.
DROP TABLE "solve_group_member";
DROP TABLE "solve_group_member_event";
DROP TABLE "solve_group";
DROP TABLE "solve_group_event";
COMMIT;
Apply schema migrations from initial migration:
./cmd/solve/solve migrate --from 001_initial
Published by udovin 6 months ago
This release includes the following improvements:
Published by udovin 7 months ago
This release includes the following improvements:
Published by udovin 7 months ago
This release includes the following improvements:
Published by udovin 7 months ago
This release includes the following improvements:
Published by udovin 8 months ago
This release includes the following improvements:
Please note that there are significant changes in this version compared to v0.1.14
.
Published by udovin 10 months ago
Published by udovin 10 months ago
Published by udovin 11 months ago
Published by udovin 11 months ago
This release includes the following improvements:
Please note that there are significant changes in this version compared to v0.1.14
.
Published by udovin 11 months ago
Published by udovin 12 months ago
Published by udovin 12 months ago
Published by udovin 12 months ago
Published by udovin 12 months ago
Published by udovin 12 months ago
Published by udovin 12 months ago
Published by udovin about 1 year ago
This release includes the following improvements:
Published by udovin over 1 year ago
This release includes the following improvements: