Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE protocols{
- id uuid NOT NULL,
- code VARCHAR(255),
- notes VARCHAR(255),
- created_at datetime,
- updated_at datetime,
- fixation_target uuid,
- is_active BOOLEAN DEFAULT TRUE,
- is_default BOOLEAN DEFAULT FALSE,
- PRIMARY KEY (id),
- FOREIGN KEY (fixation_point) REFERENCES fixation_targets(id) ON UPDATE CASCADE
- };
- CREATE TABLE protocols_execution{
- id uuid NOT NULL,
- exam_id uuid NOT NULL,
- serialized_protocol_data VARCHAR(10000) NOT NULL,
- PRIMARY KEY (id),
- FOREIGN KEY (exam_id) REFERENCES exams(id) ON UPDATE CASCADE ON DELETE CASCADE,
- };
- CREATE TABLE protocol_steps{
- id uuid NOT NULL,
- notes VARCHAR(255),
- image_tipe VARCHAR(255) NOT NULL,
- number_of_frames INT NOT NULL,
- focus_shift INT DEFAULT 0,
- PRIMARY KEY (id)
- };
- CREATE TABLE protocol_configurations{
- protocol_id uuid NOT NULL,
- step_id uuid NOT NULL,
- step_position INT NOT NULL,
- CONSTRAINT PK_detail PRIMARY KEY (protocol_id, step_id, step_position),
- FOREIGN KEY (protocol_id) REFERENCES protocols(id),
- FOREIGN KEY (step_id) REFERENCES protocol_steps(id)
- };
- CREATE TABLE protocol_data{
- id uuid NOT NULL,
- image_id uuid NOT NULL,
- serialized_step_data VARCHAR(10000) NOT NULL,
- PRIMARY KEY (id),
- FOREIGN KEY (image_id) REFERENCES images(id) ON UPDATE CASCADE ON DELETE CASCADE
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement