<commit_before>-- 1

CREATE TABLE version (
       schema TEXT PRIMARY KEY,
       version INT NOT NULL
);
CREATE INDEX version_idx ON version(schema);

CREATE TABLE admin (
       adminID INTEGER PRIMARY KEY,
       name TEXT,
       adminKey TEXT,
       role INTEGER,
       interval INTEGER,
       email TEXT
);
CREATE UNIQUE INDEX admin_key_idx ON admin(adminKey);
CREATE UNIQUE INDEX admin_name_idx ON admin(name);

CREATE TABLE persons (
       personID INTEGER PRIMARY KEY,
       nameID INTEGER NOT NULL,
       contactID INTEGER NOT NULL,
       affiliationID INTEGER NOT NULL,
       positionID INTEGER NOT NULL,
       adminID INTEGER NOT NULL,
       UNIQUE(nameID),
       FOREIGN KEY (contactID) REFERENCES contacts(contactID),
       FOREIGN KEY (affiliationID) REFERENCES affiliations(affiliationID),
       FOREIGN KEY (positionID) REFERENCES positions(positionID),
       FOREIGN KEY (nameID) REFERENCES names(nameID),
       FOREIGN KEY (adminID) REFERENCES admin(adminID)
);

CREATE TABLE events (
       eventID INTEGER PRIMARY KEY,
       convenorID INTEGER NOT NULL,
       titleID INTEGER NOT NULL,
       descriptionID INTEGER NOT NULL,
       pageDate INTEGER NOT NULL,
       presenterID INTEGER,
       noteID INTEGER,
       FOREIGN KEY (convenorID) REFERENCES persons(personID),
       FOREIGN KEY (presenterID) REFERENCES persons(personID),
       FOREIGN KEY (titleID) REFERENCES titles(titleID),
       FOREIGN KEY (descriptionID) REFERENCES descriptions(descriptionID),
       FOREIGN KEY (noteID) REFERENCES notes(noteID)
);

CREATE TABLE sessions (
       sessionID INTEGER PRIMARY KEY,
       eventID INTEGER NOT NULL,
       adminID INTEGER NOT NULL,
       titleID INTEGER NOT NULL,<commit_msg>Add published flag to events table<commit_after>-- 1

CREATE TABLE version (
       schema TEXT PRIMARY KEY,
       version INT NOT NULL
);
CREATE INDEX version_idx ON version(schema);

CREATE TABLE admin (
       adminID INTEGER PRIMARY KEY,
       name TEXT,
       adminKey TEXT,
       role INTEGER,
       interval INTEGER,
       email TEXT
);
CREATE UNIQUE INDEX admin_key_idx ON admin(adminKey);
CREATE UNIQUE INDEX admin_name_idx ON admin(name);

CREATE TABLE persons (
       personID INTEGER PRIMARY KEY,
       nameID INTEGER NOT NULL,
       contactID INTEGER NOT NULL,
       affiliationID INTEGER NOT NULL,
       positionID INTEGER NOT NULL,
       adminID INTEGER NOT NULL,
       UNIQUE(nameID),
       FOREIGN KEY (contactID) REFERENCES contacts(contactID),
       FOREIGN KEY (affiliationID) REFERENCES affiliations(affiliationID),
       FOREIGN KEY (positionID) REFERENCES positions(positionID),
       FOREIGN KEY (nameID) REFERENCES names(nameID),
       FOREIGN KEY (adminID) REFERENCES admin(adminID)
);

CREATE TABLE events (
       eventID INTEGER PRIMARY KEY,
       convenorID INTEGER NOT NULL,
       titleID INTEGER NOT NULL,
       descriptionID INTEGER NOT NULL,
       pageDate INTEGER NOT NULL,
       presenterID INTEGER,
       noteID INTEGER,
       published BOOLEAN,
       FOREIGN KEY (convenorID) REFERENCES persons(personID),
       FOREIGN KEY (presenterID) REFERENCES persons(personID),
       FOREIGN KEY (titleID) REFERENCES titles(titleID),
       FOREIGN KEY (descriptionID) REFERENCES descriptions(descriptionID),
       FOREIGN KEY (noteID) REFERENCES notes(noteID)
);

CREATE TABLE sessions (
       sessionID INTEGER PRIMARY KEY,
       eventID INTEGER NOT NULL,
       adminID INTEGER NOT NULL,
       titleID INTEGER NOT NULL,
{'fraction_non_alphanumeric': 0.05771964742678419, 'fraction_numerical': 0.0005686664771111743, 'mean_word_length': 2.9483726150392817, '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': '4290732', 'n_tokens_mistral': 1077, 'n_tokens_neox': 965, 'n_words': 348}