<commit_before>-- The Cypress Databse

CREATE TABLE designs (
  id SERIAL PRIMARY KEY,
  name text NOT NULL
);

CREATE TABLE systems (
  id SERIAL PRIMARY KEY,
  name ltree NOT NULL
);

CREATE TABLE ids (
  id SERIAL PRIMARY KEY,
  name text NOT NULL,
  sys_id integer REFERENCES systems ON DELETE CASCADE NOT NULL,
  design_id integer REFERENCES designs ON DELETE CASCADE NOT NULL
);

CREATE TABLE positions (
  id SERIAL PRIMARY KEY,
  x float,
  y float,
  z float
);

CREATE TABLE packet_conductors (
  id SERIAL PRIMARY KEY,
  capacity integer,
  latency integer
);

CREATE TABLE network_hosts (
  id integer PRIMARY KEY REFERENCES ids ON DELETE CASCADE
);<commit_msg>add some unique constraints<commit_after>-- The Cypress Databse

CREATE TABLE designs (
  id SERIAL PRIMARY KEY,
  name text UNIQUE NOT NULL
);

CREATE TABLE systems (
  id SERIAL PRIMARY KEY,
  design_id integer REFERENCES designs ON DELETE CASCADE NOT NULL,
  name ltree NOT NULL,
  UNIQUE (design_id, name)
);

CREATE TABLE ids (
  id SERIAL PRIMARY KEY,
  name text NOT NULL,
  sys_id integer REFERENCES systems ON DELETE CASCADE NOT NULL,
  UNIQUE (name, sys_id)
);

CREATE TABLE positions (
  id SERIAL PRIMARY KEY,
  x float,
  y float,
  z float
);

CREATE TABLE packet_conductors (
  id SERIAL PRIMARY KEY,
  capacity integer,
  latency integer
);

CREATE TABLE network_hosts (
  id integer PRIMARY KEY REFERENCES ids ON DELETE CASCADE
);
{'fraction_non_alphanumeric': 0.05211267605633803, 'fraction_numerical': 0.0, 'mean_word_length': 3.7525083612040135, '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': '1496103', 'n_tokens_mistral': 481, 'n_tokens_neox': 460, 'n_words': 192}