<commit_before>--drop table products;
--drop table repos;
--drop table gitlog;

create table products (
    id            integer primary key asc,
    name          text
);

create table repos (
    id            integer primary key asc,
    product       integer,
    name          text,
    url           text
);

create table branches_for_commit (
    id            integer primary key asc,
    commit_id     integer, -- foreign key to commits
    branch        text
);

create table commits (
    id            integer primary key asc,
    product       integer, -- foreign key to products
    repo          integer, -- foreign key to repos
    branch        text,
    sha           text,
    message       text,
    author        text,
    date          date,
    files_changed integer,
    insertions    integer,
    deletions     integer
);

create table changed_files (
    id            integer primary key,
    commit_id     integer,
    file_name     text,
    operation     text
);

insert into products(name) values('Product #1');
insert into products(name) values('Product #2');

insert into repos(product, name, url) values ((select id from products where name='Product #1'), 'repo#1', 'git<EMAIL>:tisnik/testrepo.git');
insert into repos(product, name, url) values ((select id from products where name='Product #1'), 'repo#2', 'git@github.com:tisnik/testrepo.ggithub.com:tisnik/testrepo.git');
insert into repos(product, name, url) values ((select id from products where name='Product #2'), 'repo#1', '<EMAIL>:tisnik/testrepo.ggithub.com:tisnik/testrepo.git');
<commit_msg>Purged code in create_database.sql<commit_after>drop table products;
drop table repos;
drop table branches_for_commit;
drop table commits;
drop table changed_files;
 
create table products (
    id            integer primary key asc,
    name          text
);

create table repos (
    id            integer primary key asc,
    product       integer,
    name          text,
    url           text
);

create table branches_for_commit (
    id            integer primary key asc,
    commit_id     integer, -- foreign key to commits
    branch        text
);

create table commits (
    id            integer primary key asc,
    product       integer, -- foreign key to products
    repo          integer, -- foreign key to repos
    branch        text,
    sha           text,
    message       text,
    author        text,
    date          date,
    files_changed integer,
    insertions    integer,
    deletions     integer
);

create table changed_files (
    id            integer primary key,
    commit_id     integer,
    file_name     text,
    operation     text
);

{'fraction_non_alphanumeric': 0.0749063670411985, 'fraction_numerical': 0.00299625468164794, 'mean_word_length': 2.0701149425287357, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '5296740', 'n_tokens_mistral': 720, 'n_tokens_neox': 700, 'n_words': 260}