<commit_before>-- DB versioning
CREATE TABLE DBVERSION (
	VALUE INTEGER NOT NULL,
	UPDATED TIMESTAMP NOT NULL
);

-- Accounts
CREATE TABLE ACCOUNT (
	ID INTEGER NOT NULL AUTO_INCREMENT,
	IDENTIFIER VARCHAR(80) NOT NULL,
	NAME VARCHAR(80) NOT NULL,
	ADMIN BOOLEAN NOT NULL DEFAULT FALSE,
	AUTH_MODE VARCHAR(10) NOT NULL,
	AUTH_CREDENTIALS VARCHAR(400) NULL,
	CONSTRAINT PK_ACCOUNT PRIMARY KEY (ID),
	CONSTRAINT UQ_ACCOUNT_IDENTIFIER UNIQUE (IDENTIFIER),
	CONSTRAINT UQ_ACCOUNT_NAME UNIQUE (NAME)
);

-- Group of projects
CREATE TABLE PROJECT_GROUP (
	ID INTEGER NOT NULL AUTO_INCREMENT,
	NAME VARCHAR(80) NOT NULL,
	DESCRIPTION VARCHAR(1000) NULL,
	CONSTRAINT PK_PROJECTGROUP PRIMARY KEY (ID),
	CONSTRAINT UQ_PROJECTGROUP UNIQUE (NAME)
);

-- Project
CREATE TABLE PROJECT (
	ID INTEGER NOT NULL AUTO_INCREMENT,
	NAME VARCHAR(80) NOT NULL,
	DESCRIPTION VARCHAR(1000) NULL,
	CONSTRAINT PK_PROJECT PRIMARY KEY (ID),
	CONSTRAINT UQ_PROJECT UNIQUE (NAME)
);

-- Branch
CREATE TABLE BRANCH (
	ID INTEGER NOT NULL AUTO_INCREMENT,
	PROJECT INTEGER NOT NULL,
	NAME VARCHAR(80) NOT NULL,<commit_msg>#3 Projects can be associated to a group<commit_after>-- DB versioning
CREATE TABLE DBVERSION (
	VALUE INTEGER NOT NULL,
	UPDATED TIMESTAMP NOT NULL
);

-- Accounts
CREATE TABLE ACCOUNT (
	ID INTEGER NOT NULL AUTO_INCREMENT,
	IDENTIFIER VARCHAR(80) NOT NULL,
	NAME VARCHAR(80) NOT NULL,
	ADMIN BOOLEAN NOT NULL DEFAULT FALSE,
	AUTH_MODE VARCHAR(10) NOT NULL,
	AUTH_CREDENTIALS VARCHAR(400) NULL,
	CONSTRAINT PK_ACCOUNT PRIMARY KEY (ID),
	CONSTRAINT UQ_ACCOUNT_IDENTIFIER UNIQUE (IDENTIFIER),
	CONSTRAINT UQ_ACCOUNT_NAME UNIQUE (NAME)
);

-- Group of projects
CREATE TABLE PROJECT_GROUP (
	ID INTEGER NOT NULL AUTO_INCREMENT,
	NAME VARCHAR(80) NOT NULL,
	DESCRIPTION VARCHAR(1000) NULL,
	CONSTRAINT PK_PROJECTGROUP PRIMARY KEY (ID),
	CONSTRAINT UQ_PROJECTGROUP UNIQUE (NAME)
);

-- Project
CREATE TABLE PROJECT (
	ID INTEGER NOT NULL AUTO_INCREMENT,
	NAME VARCHAR(80) NOT NULL,
	PROJECT_GROUP INTEGER NULL,
	DESCRIPTION VARCHAR(1000) NULL,
	CONSTRAINT PK_PROJECT PRIMARY KEY (ID),
	CONSTRAINT UQ_PROJECT UNIQUE (NAME),
	CONSTRAINT FK_PROJECT_PROJECT_GROUP FOREIGN KEY (PROJECT_GROUP) REFERENCES PROJECT_GROUP (ID) ON DELETE SET NULL
);

-- Branch
CREATE TABLE BRANCH (
	ID INTEGER NOT NULL AUTO_INCREMENT,
	PROJECT INTEGER NOT NULL,
	NAME VARCHAR(80) NOT NULL,
{'fraction_non_alphanumeric': 0.06945036216446528, 'fraction_numerical': 0.020025564550489986, 'mean_word_length': 5.228116710875332, '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': '4497948', 'n_tokens_mistral': 909, 'n_tokens_neox': 819, 'n_words': 273}