-
Notifications
You must be signed in to change notification settings - Fork 898
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
[WIP] Add unique indexes for containers tables #15308
Commits on Jun 6, 2017
-
Add :deleted to the disconnectable Containers tables
Add :deleted to the disconnectable Containers tables, which will allow us to mark soft deleted records.
Configuration menu - View commit details
-
Copy full SHA for c446182 - Browse repository at this point
Copy the full SHA c446182View commit details -
Change disconnected Containers records to soft deleted
Change disconnected Containers records to soft deleted, reconnecting the old_ems_id if possible.
Configuration menu - View commit details
-
Copy full SHA for 81c85fe - Browse repository at this point
Copy the full SHA 81c85feView commit details -
Specs for changing disconnected Containers records to soft deleted
Specs for changing disconnected Containers records to soft deleted
Configuration menu - View commit details
-
Copy full SHA for f365174 - Browse repository at this point
Copy the full SHA f365174View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 1fe04b3 - Browse repository at this point
Copy the full SHA 1fe04b3View commit details -
Fix the comment :deleted => true goes to :ems_id => nil
Fix the comment :deleted => true goes to :ems_id => nil
Configuration menu - View commit details
-
Copy full SHA for c373acb - Browse repository at this point
Copy the full SHA c373acbView commit details -
Use only :deleted_on column for soft_delete
Use only :deleted_on column for soft_delete, where :deleted_on => nil marks not deleted record.
Configuration menu - View commit details
-
Copy full SHA for 09e1703 - Browse repository at this point
Copy the full SHA 09e1703View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for baf8540 - Browse repository at this point
Copy the full SHA baf8540View commit details -
Do soft delete instead of disconnecting ems
Do soft delete using :deleted => true instead of doing ems disconnect by setting :ems_id => nil
Configuration menu - View commit details
-
Copy full SHA for 3ea9f44 - Browse repository at this point
Copy the full SHA 3ea9f44View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for ea502d3 - Browse repository at this point
Copy the full SHA ea502d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for c129f2e - Browse repository at this point
Copy the full SHA c129f2eView commit details -
Use :active, :archived scopes and methods for soft-delete
Use :active, :archived scopes and methods for soft-delete
Configuration menu - View commit details
-
Copy full SHA for 763c40d - Browse repository at this point
Copy the full SHA 763c40dView commit details -
Use only :deleted_on for a soft-delete
Use only :deleted_on for a soft-delete
Configuration menu - View commit details
-
Copy full SHA for 0d998c6 - Browse repository at this point
Copy the full SHA 0d998c6View commit details -
Move dependent destroy to _all relations
Move dependent destroy to _all relations, since we want to cascade deleted both active and archived records.
Configuration menu - View commit details
-
Copy full SHA for 7af3709 - Browse repository at this point
Copy the full SHA 7af3709View commit details -
Remove duplicate :container_definitions relation
Remove duplicate :container_definitions relation, we already have it defined using :ems_id foreign key
Configuration menu - View commit details
-
Copy full SHA for bb2f07a - Browse repository at this point
Copy the full SHA bb2f07aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 46ec716 - Browse repository at this point
Copy the full SHA 46ec716View commit details