<commit_before>CREATE TABLE IF NOT EXISTS image_collections (
  id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
  created_at timestamptz NOT NULL DEFAULT clock_timestamp(),
  modified_at timestamptz NOT NULL DEFAULT clock_timestamp(),
  deleted_at timestamptz DEFAULT NULL,

  version bigint NOT NULL DEFAULT 0,

  "user" uuid NOT NULL REFERENCES users(id),
  name text NOT NULL,

  deleted boolean NOT NULL DEFAULT false
) WITH (OIDS=FALSE);

CREATE TRIGGER image_collections_occ_tgr BEFORE UPDATE ON image_collections
  FOR EACH ROW EXECUTE PROCEDURE handle_occ();

CREATE TRIGGER image_collections_modified_at_tgr BEFORE UPDATE ON image_collections
  FOR EACH ROW EXECUTE PROCEDURE update_modified_at();

CREATE TABLE IF NOT EXISTS images (
  id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
  created_at timestamptz NOT NULL DEFAULT clock_timestamp(),
  modified_at timestamptz NOT NULL DEFAULT clock_timestamp(),
  deleted_at timestamptz DEFAULT NULL,

  version bigint NOT NULL DEFAULT 0,
  "user" uuid NOT NULL REFERENCES users(id),

  collection uuid REFERENCES image_collections(id)
                  ON DELETE SET NULL
                  DEFAULT NULL,

  name text NOT NULL,
  path text NOT NULL
) WITH (OIDS=FALSE);

CREATE INDEX ON images (collection);

CREATE TRIGGER images_occ_tgr BEFORE UPDATE ON images
  FOR EACH ROW EXECUTE PROCEDURE handle_occ();

CREATE TRIGGER images_modified_at_tgr BEFORE UPDATE ON images
  FOR EACH ROW EXECUTE PROCEDURE update_modified_at();
<commit_msg>Add missing deleted field on images table.<commit_after>CREATE TABLE IF NOT EXISTS image_collections (
  id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
  created_at timestamptz NOT NULL DEFAULT clock_timestamp(),
  modified_at timestamptz NOT NULL DEFAULT clock_timestamp(),
  deleted_at timestamptz DEFAULT NULL,

  version bigint NOT NULL DEFAULT 0,

  "user" uuid NOT NULL REFERENCES users(id),
  name text NOT NULL,

  deleted boolean NOT NULL DEFAULT false
) WITH (OIDS=FALSE);

CREATE TRIGGER image_collections_occ_tgr BEFORE UPDATE ON image_collections
  FOR EACH ROW EXECUTE PROCEDURE handle_occ();

CREATE TRIGGER image_collections_modified_at_tgr BEFORE UPDATE ON image_collections
  FOR EACH ROW EXECUTE PROCEDURE update_modified_at();

CREATE TABLE IF NOT EXISTS images (
  id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
  created_at timestamptz NOT NULL DEFAULT clock_timestamp(),
  modified_at timestamptz NOT NULL DEFAULT clock_timestamp(),
  deleted_at timestamptz DEFAULT NULL,

  version bigint NOT NULL DEFAULT 0,
  "user" uuid NOT NULL REFERENCES users(id),

  collection uuid REFERENCES image_collections(id)
                  ON DELETE SET NULL
                  DEFAULT NULL,

  name text NOT NULL,
  path text NOT NULL,

  deleted boolean NOT NULL DEFAULT false
) WITH (OIDS=FALSE);

CREATE INDEX ON images (collection);

CREATE TRIGGER images_occ_tgr BEFORE UPDATE ON images
  FOR EACH ROW EXECUTE PROCEDURE handle_occ();

CREATE TRIGGER images_modified_at_tgr BEFORE UPDATE ON images
  FOR EACH ROW EXECUTE PROCEDURE update_modified_at();

{'fraction_non_alphanumeric': 0.04441541476159373, 'fraction_numerical': 0.002612671456564337, 'mean_word_length': 4.640883977900552, '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': '918059', 'n_tokens_mistral': 959, 'n_tokens_neox': 926, 'n_words': 350}