Semaphore/db/sql/migrations/v2.9.60.sql

47 lines
1.5 KiB
MySQL
Raw Normal View History

2024-02-11 20:52:14 +01:00
create table project__integration (
2024-01-15 20:35:47 +01:00
`id` integer primary key autoincrement,
`name` varchar(255) not null,
`project_id` int not null,
`template_id` int not null,
`auth_method` varchar(15) not null default 'none',
`auth_secret_id` int,
2024-02-12 10:50:01 +01:00
`auth_header` varchar(255),
2023-07-03 01:41:13 +02:00
2024-01-15 20:35:47 +01:00
foreign key (`project_id`) references project(`id`) on delete cascade,
foreign key (`template_id`) references project__template(`id`) on delete cascade,
foreign key (`auth_secret_id`) references access_key(`id`) on delete set null
2023-07-03 01:41:13 +02:00
);
2024-03-06 22:17:34 +01:00
create table project__integration_extractor (
2024-01-15 20:35:47 +01:00
`id` integer primary key autoincrement,
`name` varchar(255) not null,
2024-03-06 14:28:24 +01:00
`integration_id` int not null,
2024-03-06 22:17:34 +01:00
foreign key (`integration_id`) references project__integration(`id`) on delete cascade
);
create table project__integration_extract_value (
`id` integer primary key autoincrement,
`name` varchar(255) not null,
`extractor_id` int not null,
2024-01-15 20:35:47 +01:00
`value_source` varchar(255) not null,
`body_data_type` varchar(255) null,
`key` varchar(255) null,
`variable` varchar(255) null,
2023-07-03 01:41:13 +02:00
2024-03-06 22:17:34 +01:00
foreign key (`extractor_id`) references project__integration_extractor(`id`) on delete cascade
2023-07-03 01:41:13 +02:00
);
2024-02-11 20:52:14 +01:00
create table project__integration_matcher (
2023-07-03 01:41:13 +02:00
`id` integer primary key autoincrement,
2024-01-15 20:35:47 +01:00
`name` varchar(255) not null,
2024-03-06 22:17:34 +01:00
`extractor_id` int not null,
2024-01-15 20:35:47 +01:00
`match_type` varchar(255) null,
`method` varchar(255) null,
`body_data_type` varchar(255) null,
`key` varchar(510) null,
`value` varchar(510) null,
2023-07-03 01:41:13 +02:00
2024-03-06 22:17:34 +01:00
foreign key (`extractor_id`) references project__integration_extractor(`id`) on delete cascade
2023-07-03 01:41:13 +02:00
);