Skip to content
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

changed data types of task_arns_to_instance_info #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rulixxx
Copy link

@rulixxx rulixxx commented Nov 29, 2023

removed not null enforcement for ip columns in postgres tables to allow ip and instance ids to be populated

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Raul seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@JonathanAquino-NextRoll
Copy link
Contributor

@rulixxx Sorry it took so long to get to this. How does removing these enforcements allow ip and instance ids to be populated?

@@ -4,8 +4,8 @@
CREATE TABLE task_arns_to_instance_info (
task_arn TEXT NOT NULL,
instance_id TEXT NOT NULL,
public_ip TEXT NOT NULL,
private_ip TEXT NOT NULL,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to do this in a new migration file called something like 00024_make_ip_columns_optional.sql:

-- +goose Up
ALTER TABLE task_arns_to_instance_info ALTER COLUMN public_ip DROP NOT NULL;
ALTER TABLE task_arns_to_instance_info ALTER COLUMN private_ip DROP NOT NULL;

-- +goose Down
ALTER TABLE task_arns_to_instance_info ALTER COLUMN public_ip SET NOT NULL;
ALTER TABLE task_arns_to_instance_info ALTER COLUMN private_ip SET NOT NULL;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants