<commit_before>CREATE TABLE task (
  id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),

  created_at timestamptz NOT NULL DEFAULT clock_timestamp(),
  modified_at timestamptz NOT NULL DEFAULT clock_timestamp(),
  completed_at timestamptz NULL DEFAULT NULL,
  scheduled_at timestamptz NOT NULL,

  queue text NOT NULL,

  name text NOT NULL,
  props bytea NOT NULL,

  error text NULL DEFAULT NULL,

  retry_num smallint NOT NULL DEFAULT 0,
  status text NOT NULL DEFAULT 'new'
);

CREATE INDEX task__scheduled_at__queue__idx
    ON task (scheduled_at, queue);

CREATE TRIGGER task__modified_at__tgr
BEFORE UPDATE ON task
   FOR EACH ROW EXECUTE PROCEDURE update_modified_at();

CREATE TABLE scheduled_task (
  id text PRIMARY KEY,<commit_msg>:tada: Add priority field to tasks table.<commit_after>CREATE TABLE task (
  id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),

  created_at timestamptz NOT NULL DEFAULT clock_timestamp(),
  modified_at timestamptz NOT NULL DEFAULT clock_timestamp(),
  completed_at timestamptz NULL DEFAULT NULL,
  scheduled_at timestamptz NOT NULL,
  priority smallint DEFAULT 100,

  queue text NOT NULL,

  name text NOT NULL,
  props bytea NOT NULL,

  error text NULL DEFAULT NULL,

  retry_num smallint NOT NULL DEFAULT 0,
  status text NOT NULL DEFAULT 'new'
);

CREATE INDEX task__scheduled_at__queue__idx
    ON task (scheduled_at, queue);

CREATE TRIGGER task__modified_at__tgr
BEFORE UPDATE ON task
   FOR EACH ROW EXECUTE PROCEDURE update_modified_at();

CREATE TABLE scheduled_task (
  id text PRIMARY KEY,
{'fraction_non_alphanumeric': 0.045425048669695, 'fraction_numerical': 0.004542504866969501, 'mean_word_length': 4.753731343283582, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1550130', 'n_tokens_mistral': 490, 'n_tokens_neox': 472, 'n_words': 181}