<commit_before>CREATE TABLE jobs (
	id integer not null primary key,
	computername text not null,
	computeruser text not null,
	script text not null,
	date_last_success timestamp,
	date_last_failure timestamp,
	last_status text,
	last_duration float
);
CREATE UNIQUE INDEX idx_jobs_job ON jobs(computername, computeruser, script);

CREATE TABLE jobhistory (
	id text not null primary key,
	job_id integer not null references jobs(id),
	ip text not null,
	datestarted timestamp not null,
	datefinished timestamp not null,
	duration float not null,
	status text not null,
	output blob
);

CREATE TABLE jobconfig (
	job_id integer not null references jobs(id) primary key,
	daystokeep int not null
);

CREATE TABLE users (
	username text NOT NULL PRIMARY KEY,
	password text NOT NULL,
	is_admin int
);

CREATE TABLE sessions (
	session_id text NOT NULL PRIMARY KEY,
	date_login timestamp NOT NULL DEFAULT ( datetime('now', 'localtime') ),
	username text NOT NULL
);

CREATE TABLE jobconfigalert (
	job_id integer not null references jobs(id),
	email text not null,
	PRIMARY KEY(job_id, email)
);

INSERT INTO users ( username, password, is_admin )
VALUES ( 'admin', '<PASSWORD>', 1 );<commit_msg>ensure that schema version is saved on creating database<commit_after>CREATE TABLE jobs (
	id integer not null primary key,
	computername text not null,
	computeruser text not null,
	script text not null,
	date_last_success timestamp,
	date_last_failure timestamp,
	last_status text,
	last_duration float
);
CREATE UNIQUE INDEX idx_jobs_job ON jobs(computername, computeruser, script);

CREATE TABLE jobhistory (
	id text not null primary key,
	job_id integer not null references jobs(id),
	ip text not null,
	datestarted timestamp not null,
	datefinished timestamp not null,
	duration float not null,
	status text not null,
	output blob
);

CREATE TABLE jobconfig (
	job_id integer not null references jobs(id) primary key,
	daystokeep int not null
);

CREATE TABLE users (
	username text NOT NULL PRIMARY KEY,
	password text NOT NULL,
	is_admin int
);

CREATE TABLE sessions (
	session_id text NOT NULL PRIMARY KEY,
	date_login timestamp NOT NULL DEFAULT ( datetime('now', 'localtime') ),
	username text NOT NULL
);

CREATE TABLE jobconfigalert (
	job_id integer not null references jobs(id),
	email text not null,
	PRIMARY KEY(job_id, email)
);

INSERT INTO users ( username, password, is_admin )
VALUES ( 'admin', '<PASSWORD>', 1 );

PRAGMA user_version=1;
{'fraction_non_alphanumeric': 0.06604158173664901, 'fraction_numerical': 0.0012229922543823889, 'mean_word_length': 4.956310679611651, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2787048', 'n_tokens_mistral': 744, 'n_tokens_neox': 727, 'n_words': 310}