jazzband / django-recurrence

Utility for working with recurring dates in Django.
https://django-recurrence.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
491 stars 190 forks source link

Added support for DEFAULT_AUTO_FIELD #209

Closed 5parkp1ug closed 2 years ago

5parkp1ug commented 2 years ago

Context

Django earlier used to create id field using django.db.fields.AutoField which got replaced with django.db.fields.BigAutoField. So, when we run makemigrations command a new migration file is created for the django-recurrence app with the changes to id field. This migration should be shipped by default with the package.

Also, when the missing migration is created in a docker environment, permission issues are raised. This happens when pip install is done as root user and later a non-root user runs the application. Below is the snippet from the dockerfile which causes the issue -

FROM python:3.9.10-slim

SHELL ["/bin/bash", "-c"]
RUN groupadd user && useradd --create-home --home-dir /home/user -g user user
WORKDIR /home/user

# Install system dependencies
RUN apt-get update \
    && apt install -y libpq-dev gcc git

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ARG BUILD_ENVIRONMENT=local

# Install app dependencies
COPY ./requirements/ /home/user/requirements
RUN pip install -r ./requirements/$BUILD_ENVIRONMENT.txt

USER user

When migration is run using the above docker configuration the user user does not have privileges to create new migration file as the environment is owned by the root user.

Changes

Added the new migration file.

5parkp1ug commented 2 years ago

Can anyone merge this PR? Or else update if there are any suggestions?

lino commented 2 years ago

Thank you for your contribution. Will make sure that we'll release a new version ASAP.

SriramPatibanda commented 10 months ago

Thank you for your contribution. Will make sure that we'll release a new version ASAP.

Any updates on when this can be released?

lino commented 10 months ago

Oh, I'm sorry, I'll block a timeslot in my calendar to push forward on this.

lino commented 10 months ago

Release v1.12 is on its way.

SriramPatibanda commented 9 months ago

Release v1.12 is on its way.

Hey!! Was there any problem with the release? As I can see, it's not pushed to pypi