Table Definition
CREATE TABLE `results` (
`task_id` varbinary(16) NOT NULL,
`status` enum('SUCCESS','FAILURE','CANCELLED') COLLATE utf8mb4_unicode_ci NOT NULL,
`result` text COLLATE utf8mb4_unicode_ci,
`reason` text COLLATE utf8mb4_unicode_ci,
`transpiled_code` text COLLATE utf8mb4_unicode_ci,
`qubit_allocation` text COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`task_id`),
CONSTRAINT `results_ibfk_1` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
task_id | varbinary(16) | false | tasks | |||
status | enum('SUCCESS','FAILURE','CANCELLED') | false | ||||
result | text | true | ||||
reason | text | true | ||||
transpiled_code | text | true | ||||
qubit_allocation | text | true |
Name | Type | Definition |
---|---|---|
PRIMARY | PRIMARY KEY | PRIMARY KEY (task_id) |
results_ibfk_1 | FOREIGN KEY | FOREIGN KEY (task_id) REFERENCES tasks (id) |
Name | Definition |
---|---|
PRIMARY | PRIMARY KEY (task_id) USING BTREE |
Name | Definition |
---|---|
update_tasks_status_trigger | CREATE TRIGGER update_tasks_status_trigger AFTER INSERT ON results FOR EACH ROW BEGIN IF NEW.status = 'SUCCESS' THEN UPDATE main.tasks SET status = 'COMPLETED' WHERE id = NEW.task_id; ELSEIF NEW.status = 'FAILURE' THEN UPDATE main.tasks SET status = 'FAILED' WHERE id = NEW.task_id; ELSEIF NEW.status = 'CANCELLED' THEN UPDATE main.tasks SET status = 'CANCELLED' WHERE id = NEW.task_id; END IF; END |
erDiagram
"results" |o--|| "tasks" : "FOREIGN KEY (task_id) REFERENCES tasks (id)"
"results" {
varbinary_16_ task_id PK
enum__SUCCESS___FAILURE___CANCELLED__ status
text result
text reason
text transpiled_code
text qubit_allocation
}
"tasks" {
varbinary_16_ id PK
varchar_64_ owner
varchar_256_ name
varchar_64_ device FK
int n_qubits
int n_nodes
text code
enum__sampling___estimation__ action
enum__state_vector___sampling__ method
int shots
varchar_1024_ operator
text qubit_allocation
tinyint_1_ skip_transpilation
int seed_transpilation
int seed_simulation
int_unsigned n_per_node
text simulation_opt
enum__none___pseudo_inverse___least_square__ ro_error_mitigation
varchar_1024_ note
enum__QUEUED___QUEUED_FETCHED___RUNNING___COMPLETED___FAILED___CANCELLING___CANCELLING_FETCHED___CANCELLED__ status
timestamp created_at
}
See here.
Generated by tbls