mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 07:19:20 +01:00
feat(tf): add task id to state
This commit is contained in:
parent
8dabb527b4
commit
58c48c27e6
@ -8,6 +8,7 @@ type TerraformInventoryAlias struct {
|
||||
InventoryID int `db:"inventory_id" json:"inventory_id"`
|
||||
AuthKeyID int `db:"auth_key_id" json:"auth_key_id"`
|
||||
Alias string `db:"alias" json:"alias"`
|
||||
TaskID *int `db:"task_id" json:"task_id"`
|
||||
}
|
||||
|
||||
var TerraformInventoryAliasProps = ObjectProps{
|
||||
|
@ -1,8 +1,8 @@
|
||||
create table project__terraform_inventory_alias(
|
||||
`alias` varchar(100) primary key,
|
||||
`project_id` int,
|
||||
`inventory_id` int,
|
||||
`auth_key_id` int,
|
||||
`project_id` int NOT NULL,
|
||||
`inventory_id` int NOT NULL,
|
||||
`auth_key_id` int NOT NULL,
|
||||
foreign key (`project_id`) references project(`id`) on delete cascade,
|
||||
foreign key (`inventory_id`) references project__inventory(`id`) on delete cascade,
|
||||
foreign key (`auth_key_id`) references access_key(`id`)
|
||||
@ -10,10 +10,12 @@ create table project__terraform_inventory_alias(
|
||||
|
||||
create table project__terraform_inventory_state(
|
||||
`id` integer primary key autoincrement,
|
||||
`project_id` int,
|
||||
`inventory_id` int,
|
||||
`state` text,
|
||||
`project_id` int NOT NULL,
|
||||
`inventory_id` int NOT NULL,
|
||||
`state` text NOT NULL,
|
||||
`created` datetime NOT NULL,
|
||||
`task_id` int,
|
||||
foreign key (`task_id`) references task(`id`) on delete set null,
|
||||
foreign key (`project_id`) references project(`id`) on delete cascade,
|
||||
foreign key (`inventory_id`) references project__inventory(`id`) on delete cascade
|
||||
);
|
Loading…
Reference in New Issue
Block a user