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

Add new status attribute to DoorCode, and remove obsolete door-code-related code #596

Merged
merged 3 commits into from
Dec 9, 2021

Conversation

anaulin
Copy link
Member

@anaulin anaulin commented Dec 6, 2021

This PR prepares the database schema for implementing the new door code workflows outlined in #594. In particular, this change:

  • adds a new status attribute to a DoorCode
  • makes it possible for a DoorCode to not be assigned to a user
  • removes the enabled attribute from DoorCode, which makes no sense in the current workflow
  • updates logic when removing key_member state to unassign the door code and set to the appropriate status
  • removes the old door bell code (which relied on things like the enabled field, which is no longer available)

@anaulin anaulin requested review from compwron and brittag December 6, 2021 02:27
@anaulin anaulin force-pushed the au/add-status-to-codes branch from 821c11e to bb31cd0 Compare December 6, 2021 02:33
@anaulin anaulin force-pushed the au/add-status-to-codes branch from bb31cd0 to e87313e Compare December 6, 2021 04:29
Copy link
Member

@compwron compwron left a comment

Choose a reason for hiding this comment

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

I took a quick look and it looks reasonable. Watch out for rails pre/post deploy migrations, you might need to restart the app after deploying since a column was removed

@anaulin
Copy link
Member Author

anaulin commented Dec 9, 2021

Thanks for the review @compwron! I'll be sure to watch out for the migrations during/after the deploy.

@anaulin anaulin merged commit 1291707 into main Dec 9, 2021
@anaulin anaulin deleted the au/add-status-to-codes branch December 9, 2021 01:32
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.

2 participants