-
Notifications
You must be signed in to change notification settings - Fork 914
chore: persist template import terraform plan in postgres #17012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c652969
6c250a3
e21a475
e4dd84f
d46076b
f86d7fe
5b97bcd
9418711
746ae46
11d20d5
1a4f3b2
a46470e
1cdb247
9d3d7a0
13ad6c8
a05c8fe
295bceb
6a92c6e
6d46c7e
c237a97
ae5330a
70fce96
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
drop table template_version_terraform_values; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
create table template_version_terraform_values ( | ||
template_version_id uuid not null unique references template_versions(id) on delete cascade, | ||
updated_at timestamptz not null default now(), | ||
cached_plan jsonb not null | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
insert into | ||
template_version_terraform_values ( | ||
template_version_id, | ||
cached_plan, | ||
updated_at | ||
) | ||
select | ||
id, | ||
'{}', | ||
now() | ||
from | ||
template_versions; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-- name: InsertTemplateVersionTerraformValuesByJobID :exec | ||
INSERT INTO | ||
template_version_terraform_values ( | ||
template_version_id, | ||
cached_plan, | ||
updated_at | ||
) | ||
VALUES | ||
( | ||
(select id from template_versions where job_id = @job_id), | ||
@cached_plan, | ||
@updated_at | ||
); |
Uh oh!
There was an error while loading. Please reload this page.