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

[WIP] Add unique indexes for containers tables #15308

Closed

Commits on Jun 6, 2017

  1. Add :deleted to the disconnectable Containers tables

    Add :deleted to the disconnectable Containers tables, which
    will allow us to mark soft deleted records.
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    c446182 View commit details
    Browse the repository at this point in the history
  2. Change disconnected Containers records to soft deleted

    Change disconnected Containers records to soft deleted, reconnecting
    the old_ems_id if possible.
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    81c85fe View commit details
    Browse the repository at this point in the history
  3. Specs for changing disconnected Containers records to soft deleted

    Specs for changing disconnected Containers records to soft deleted
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    f365174 View commit details
    Browse the repository at this point in the history
  4. Add partial index to :deleted col to speedup queries

    Add partial index to :deleted col to speedup queries. It has
    to be a partial index, otherwise the cost is too high and
    PG will not pick it.
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    1fe04b3 View commit details
    Browse the repository at this point in the history
  5. Fix the comment :deleted => true goes to :ems_id => nil

    Fix the comment :deleted => true goes to :ems_id => nil
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    c373acb View commit details
    Browse the repository at this point in the history
  6. Use only :deleted_on column for soft_delete

    Use only :deleted_on column for soft_delete, where
    :deleted_on => nil marks not deleted record.
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    09e1703 View commit details
    Browse the repository at this point in the history
  7. Scope ems relations to show only :deleted => false

    Scope ems relations to show only :deleted => false, which mimics
    the missing :ems_id foreign key we had before, doing disconnect ems.
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    baf8540 View commit details
    Browse the repository at this point in the history
  8. Do soft delete instead of disconnecting ems

    Do soft delete using :deleted => true instead of doing ems
    disconnect by setting :ems_id => nil
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    3ea9f44 View commit details
    Browse the repository at this point in the history
  9. Add scopes for deleted not deleted to the archived mixing

    Add scopes for deleted not deleted to the archived mixin, we
    should always use a scope, rather than a specific query.
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    ea502d3 View commit details
    Browse the repository at this point in the history
  10. Alias archived? to deleted?

    Alias archived? to deleted?
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    c129f2e View commit details
    Browse the repository at this point in the history
  11. Use :active, :archived scopes and methods for soft-delete

    Use :active, :archived scopes and methods for soft-delete
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    763c40d View commit details
    Browse the repository at this point in the history
  12. Use only :deleted_on for a soft-delete

    Use only :deleted_on for a soft-delete
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    0d998c6 View commit details
    Browse the repository at this point in the history
  13. Move dependent destroy to _all relations

    Move dependent destroy to _all relations, since we want
    to cascade deleted both active and archived records.
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    7af3709 View commit details
    Browse the repository at this point in the history
  14. Remove duplicate :container_definitions relation

    Remove duplicate :container_definitions relation, we already
    have it defined using :ems_id foreign key
    Ladas committed Jun 6, 2017
    Configuration menu
    Copy the full SHA
    bb2f07a View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    46ec716 View commit details
    Browse the repository at this point in the history