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

Fix incorrect liquibase references to instance_id #1286

Merged
merged 1 commit into from Aug 1, 2022

Commits on Aug 1, 2022

  1. Fix incorrect liquibase references to instance_id

    Confusingly, we have a column named `instance_id` on the `hosts` table;
    we also have a column named `instance_id` on `instance_measurements`.
    However, the `instance_id` on `instance_measurements` references
    `hosts.id` and NOT `hosts.instance_id`.
    
    Testing
    -------
    
    Try the following sql for testing the trigger change:
    
    ```sql
    insert into account_services(account_number, service_type) values ('a123', 'HBI_HOST');
    insert into hosts(id, instance_id, display_name, account_number, org_id, cores, sockets)
    values ('0cfbdd0e-8f5d-4152-9945-f8fd452c2b2d', 'foobar', 'foo', 'a123', 'org123', 4, null);
    select * from instance_measurements;
    ```
    
    The original testing instructions used the same value for both `id` and
    `instance_id`, which is possibly why this wasn't caught sooner.
    
    Note that given the changesets involved were modified, I added
    `runOnChange=true` to simplify re-running against deployments where it's
    already run.
    kahowell committed Aug 1, 2022
    Copy the full SHA
    112db24 View commit details
    Browse the repository at this point in the history