Skip to content

Commit 99f9b31

Browse files
committed
added execution_type states
1 parent a9eedb1 commit 99f9b31

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

database/fuzzili.sql

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ CREATE TABLE fuzzer (
99
inserted_at TIMESTAMP DEFAULT NOW()
1010
);
1111

12+
CREATE TABLE execution_type (
13+
id SERIAL PRIMARY KEY,
14+
title VARCHAR(32) NOT NULL
15+
);
16+
17+
--preseed with AI Mut, Delta, OG Testcase type
18+
-- reference in execution table
19+
1220
-- Program table: Stores generated test programs
1321
CREATE TABLE program (
1422
program_base64 TEXT PRIMARY KEY, -- Base64-encoded test program (unique identifier)
@@ -19,6 +27,7 @@ CREATE TABLE program (
1927
CREATE TABLE execution (
2028
execution_id SERIAL PRIMARY KEY, -- Unique identifier for each execution
2129
program_base64 TEXT NOT NULL REFERENCES program(program_base64) ON DELETE CASCADE, -- Links to the executed program
30+
execution_type_id INTEGER NOT NULL REFERENCES execution_type(id), -- Links to execution type
2231
feedback_vector JSONB, -- JSON structure containing execution feedback data
2332
turboshaft_ir TEXT, -- Turboshaft intermediate representation output
2433
coverage_total NUMERIC(5,2), -- Total code coverage percentage (0.00 to 999.99)
@@ -29,4 +38,14 @@ CREATE TABLE execution (
2938
ALTER TABLE program
3039
ADD CONSTRAINT fk_program_fuzzer
3140
FOREIGN KEY (program_base64)
32-
REFERENCES fuzzer(program_base64);
41+
REFERENCES fuzzer(program_base64);
42+
43+
INSERT INTO execution_type (title) VALUES
44+
('AI Mutation'),
45+
('Delta Analysis'),
46+
('Testcase');
47+
48+
CREATE INDEX idx_execution_program ON execution(program_base64);
49+
CREATE INDEX idx_execution_type ON execution(execution_type_id);
50+
CREATE INDEX idx_execution_created ON execution(created_at);
51+
CREATE INDEX idx_execution_coverage ON execution(coverage_total);

0 commit comments

Comments
 (0)