solve

API driven competitive programming system

APACHE-2.0 License

Stars
18
Committers
2

Bot releases are visible (Hide)

solve - v0.2.6 Latest Release

Published by udovin 4 months ago

This release includes the following improvements:

  • Added support for accounts observing and searching.
  • Summarized participant management.
  • Added support for observing and updating user status.
  • Updated dependencies.
solve - v0.2.5

Published by udovin 5 months ago

This release includes the following improvements:

  • Added kind column for solution. (breaking change)
  • Removed solution_id column from contest_solution. (breaking change)
  • Removed account_id column from user, scope_user, scope and group. (breaking change)

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
solve - v0.2.4

Published by udovin 6 months ago

This release includes the following improvements:

  • Changed resource limits.
solve - v0.2.3

Published by udovin 6 months ago

This release includes the following improvements:

  • Added pagination for contest solutions.
solve - v0.2.2

Published by udovin 7 months ago

This release includes the following improvements:

  • Added pids limit configuration support.
solve - v0.2.1

Published by udovin 7 months ago

This release includes the following improvements:

  • Initial support for groups.
  • Removed hash table index from cached stores.
  • Fixed bugs.
solve - v0.2.0

Published by udovin 8 months ago

This release includes the following improvements:

  • Email confirmations.
  • Password reset.
  • Solutions CPU and PID limit support.
  • Ownership transfers.
  • B-tree indexes support.
  • Assets in Github releases.
  • Changes in structure of repository.
  • Many bug fixes.

Please note that there are significant changes in this version compared to v0.1.14.

solve - v0.2.0-beta.2

Published by udovin 10 months ago

solve - v0.2.0-beta.1

Published by udovin 10 months ago

solve - v0.2.0-beta.1

Published by udovin 11 months ago

solve - v0.2.0-beta

Published by udovin 11 months ago

This release includes the following improvements:

  • Email confirmations.
  • Ownership transfers.
  • B-tree indexes support.
  • Assets in Github releases.
  • Changes in structure of repository.
  • Bug fixes.

Please note that there are significant changes in this version compared to v0.1.14.

solve - v0.2.0-alpha.7

Published by udovin 11 months ago

solve - v0.2.0-alpha.6

Published by udovin 12 months ago

solve - v0.2.0-alpha.5

Published by udovin 12 months ago

solve - v0.2.0-alpha.4

Published by udovin 12 months ago

solve - v0.2.0-alpha.3

Published by udovin 12 months ago

solve - v0.2.0-alpha.2

Published by udovin 12 months ago

solve - v0.2.0-alpha.1

Published by udovin 12 months ago

solve - v0.2.0-alpha

Published by udovin about 1 year ago

This release includes the following improvements:

  • Added support for user email management.
  • Added support for temporary tokens.
solve - v0.1.14

Published by udovin over 1 year ago

This release includes the following improvements:

  • Improvements in solution testing.
Package Rankings
Top 8.08% on Proxy.golang.org
Badges
Extracted from project README
GoDoc codecov Go Report Card CII Best Practices
Related Projects