diff --git a/migrations/20240727123308_initial.sql b/migrations/20240727123308_initial.sql index 9a2d71d..8b40b4c 100644 --- a/migrations/20240727123308_initial.sql +++ b/migrations/20240727123308_initial.sql @@ -11,13 +11,13 @@ CREATE TABLE IF NOT EXISTS problems tutorial varchar(10240) NOT NULL DEFAULT '', latex_summary varchar(10240) NOT NULL DEFAULT '', time_limit integer NOT NULL DEFAULT 1000, - memory_limit integer NOT NULL DEFAULT 65536, + memory_limit integer NOT NULL DEFAULT 64, created_at timestamptz NOT NULL DEFAULT now(), updated_at timestamptz NOT NULL DEFAULT now(), PRIMARY KEY (id), CHECK (length(title) != 0), - CHECK (memory_limit > 0), - CHECK (time_limit > 0) + CHECK (memory_limit BETWEEN 4 and 1024), + CHECK (time_limit BETWEEN 250 and 15000) ); CREATE TRIGGER on_problems_update