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

Create AdopterFosterAccount #551

Merged
merged 21 commits into from
Mar 22, 2024
Merged

Create AdopterFosterAccount #551

merged 21 commits into from
Mar 22, 2024

Conversation

ErinClaudio
Copy link
Collaborator

@ErinClaudio ErinClaudio commented Mar 15, 2024

🔗 Issue

#449

✍️ Description

📷 Screenshots/Demos

@ErinClaudio
Copy link
Collaborator Author

@kasugaijin

Please review and let me know if this approach seems appropriate.

This adjustment involved only altering the model name, so I updated the wording in the model files accordingly while keeping the relationships unchanged.

Planned Steps:

  1. Rename AdopterAccount to AdopterFosterAccount across the entire application.
  2. This renaming will necessitate a series of migrations. Execute these migrations and address any resulting errors.
  3. Ideally, all tests should pass after these changes. If not, we will tackle the failing tests next.

Let me know your thoughts.

@ErinClaudio
Copy link
Collaborator Author

notes

db/schema.rb Outdated Show resolved Hide resolved
db/schema.rb Outdated Show resolved Hide resolved
db/schema.rb Outdated Show resolved Hide resolved
db/schema.rb Outdated Show resolved Hide resolved
@kasugaijin
Copy link
Collaborator

Yes your steps seem appropriate. I have left a series of comments. One thing, while you have started a new branch, it looks like you have not reset your database and you have committed schema changes from the old PR where we were going to use polymorphic association. Note that your database, unless you create a new one for a separate branch, or recreate it entirely, will still have the schema from whatever migrations you have run on it. In this case, it has the changes from the migrations in the old PR. So please drop and recreate your db, paying a mind to which migrations you have in this branch, and ensure you only have the migrations from main branch + whatever you need for this PR. That will re-write the schema and remove the unwanted changes we have above. Thanks!

@ErinClaudio ErinClaudio force-pushed the Create-AdopterFosterAccount branch from 4995264 to e5d791e Compare March 18, 2024 15:32
@ErinClaudio ErinClaudio reopened this Mar 18, 2024
@ErinClaudio
Copy link
Collaborator Author

@kasugaijin I hope I've left this ticket in a decent spot for you. The schema should now reflect the correct changes. The next steps involve updating the seed file and modifying all instances of the adopter_accounts.

Ben Robinson added 2 commits March 18, 2024 15:50
…ce to adopter_foster_account id and change references in code to adopter account to use the new model/method name
@kasugaijin
Copy link
Collaborator

@kasugaijin I hope I've left this ticket in a decent spot for you. The schema should now reflect the correct changes. The next steps involve updating the seed file and modifying all instances of the adopter_accounts.

Thanks @ErinClaudio! You did most of the work. Just two quick commits after.

@kasugaijin kasugaijin requested a review from nsiwnf March 18, 2024 23:24
@kasugaijin kasugaijin requested a review from mononoken March 18, 2024 23:24
@nsiwnf
Copy link
Collaborator

nsiwnf commented Mar 19, 2024

Great job! Would it be possible to combine all the migrations into one migration file? I think we can also rename columns which would help retain data

@kasugaijin
Copy link
Collaborator

kasugaijin commented Mar 19, 2024

Great job! Would it be possible to combine all the migrations into one migration file? I think we can also rename columns which would help retain data

Done. I split the table rename and column renames into two migration files. I also added foreign key constraints for the belong_to relationships.

@kasugaijin kasugaijin marked this pull request as ready for review March 19, 2024 22:51
Copy link
Collaborator

@mononoken mononoken left a comment

Choose a reason for hiding this comment

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

lgtm! I think we should update the authorization permission names to reflect the AdopterProfile to AdopterFosterProfile name change, but I can do that in a separate PR once this is merged.

Thank you for all the work, Erin!

@kasugaijin
Copy link
Collaborator

lgtm! I think we should update the authorization permission names to reflect the AdopterProfile to AdopterFosterProfile name change, but I can do that in a separate PR once this is merged.

Thank you for all the work, Erin!

Good point! This branch needs main merging in and then running find and replace again. I can do that.

@kasugaijin
Copy link
Collaborator

kasugaijin commented Mar 21, 2024

@mononoken I made changes to policy permission names (commit below) and added unique constraint to the index as suggested.

FYI I am finishing this off for Erin as he is away for 10 days - @ErinClaudio is aware I was taking over :)

@mononoken
Copy link
Collaborator

@mononoken I made changes to policy permission names (commit below) and added unique constraint to the index as suggested.

FYI I am finishing this off for Erin as he is away for 10 days - @ErinClaudio is aware I was taking over :)

Thanks for taking over, @kasugaijin ! The new changes look good.

@kasugaijin
Copy link
Collaborator

@mononoken I made changes to policy permission names (commit below) and added unique constraint to the index as suggested.
FYI I am finishing this off for Erin as he is away for 10 days - @ErinClaudio is aware I was taking over :)

Thanks for taking over, @kasugaijin ! The new changes look good.

@mononoken feel free to approve and merge if you want to!

@mononoken mononoken changed the title Added rename AdopterFosterAccount migration Create AdopterFosterAccount Mar 22, 2024
@mononoken mononoken merged commit 9055215 into main Mar 22, 2024
5 checks passed
@mononoken mononoken deleted the Create-AdopterFosterAccount branch March 22, 2024 20:49
@mononoken mononoken linked an issue Mar 22, 2024 that may be closed by this pull request
@kasugaijin
Copy link
Collaborator

Nice! This unblocks a lot of work!

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.

Foster epic: Create AdopterFosterAccount
4 participants