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

Recreate Migrations and Add User Model #1

Merged
merged 28 commits into from
Jan 2, 2024
Merged

Conversation

engineervix
Copy link
Member

@engineervix engineervix commented Dec 22, 2023

Link to Ticket

Description of Changes Made

This PR removes all existing migrations and recreates them. In addition, a custom User model is added to the project, as recommended in the Django docs.

We are doing this because we want to import selected data from the current wagtail build (rather than everything). By starting on a clean slate, we will hopefully have a smoother eperience with content imports.

PR Checklist

  • Add a description of your pull request and instructions for the reviewer to verify your work.
  • If your pull request is for a specific ticket, link to it in the description.
  • Stay on point and keep it small so the merge request can be easily reviewed.
  • Consider adding unit tests, especially for bug fixes. If you don't, tell us why.
  • Tests and linting passes.
  • Consider updating documentation. If you don't, tell us why.
  • If relevant, list the environments / browsers in which you tested your changes.

as per Django recommendations:

> If you’re starting a new project, it’s highly recommended to set up a custom user model,
> even if the default User model is sufficient for you. This model behaves identically to
> the default user model, but you’ll be able to customize it in the future if the need arises
>
> https://docs.djangoproject.com/en/3.2/topics/auth/customizing/#using-a-custom-user-model-when-starting-a-project
@engineervix engineervix self-assigned this Dec 22, 2023
Copy link
Member

@helenb helenb left a comment

Choose a reason for hiding this comment

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

Thanks @engineervix - I have tested this on my local build and successfully run the migrations. I think we should delete the services and propositions apps though as these will be re-done from scratch. I also had a question on why some apps seem to have more than one initial migration file.

cc @ababic in case he has any comments.

tbx/images/migrations/0002_initial.py Outdated Show resolved Hide resolved
tbx/services/migrations/0002_initial.py Outdated Show resolved Hide resolved
Copy link
Member

@helenb helenb left a comment

Choose a reason for hiding this comment

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

Thanks @engineervix this looks good now

Copy link
Member

@helenb helenb left a comment

Choose a reason for hiding this comment

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

Approving

@engineervix engineervix merged commit 6efb1fe into main Jan 2, 2024
3 checks passed
@engineervix engineervix deleted the refactor/models branch January 2, 2024 11:51
@helenb helenb temporarily deployed to torchbox-com-staging January 3, 2024 10:01 Inactive
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.

3 participants