django-pyodbc-azure icon indicating copy to clipboard operation
django-pyodbc-azure copied to clipboard

Django 2.2 support

Open PaszaVonPomiot opened this issue 5 years ago • 15 comments

Hi,

There seems to be new alpha version released of Django and it appears that it will require some database backend changes. So I'm just giving you a head's up because I will be very interested in keep using my MS SQL database with Django 2.2 once it's released. Thanks for keeping it up to date so far!

https://docs.djangoproject.com/en/dev/releases/2.2/#database-backend-api

PaszaVonPomiot avatar Feb 02 '19 18:02 PaszaVonPomiot

Django 2.2 is out now.

PaszaVonPomiot avatar Apr 03 '19 18:04 PaszaVonPomiot

Any word on this, @michiya? Anything we can help with?

FlipperPA avatar Apr 08 '19 19:04 FlipperPA

Django 2.2 is an LTS release so I'm just here to say +1 to this issue

melizeche avatar Apr 09 '19 00:04 melizeche

For everyone looking for 2.2 support - it's possible to simply change the version constraints and this driver installs properly. It works fine for my application but I don't know if there are any hidden problems that will come up later. https://github.com/balazs-endresz/django-pyodbc-azure/commit/f4543e98bc10ec02e12614c10c2892aac9e1c415?diff=unified

PaszaVonPomiot avatar Apr 09 '19 18:04 PaszaVonPomiot

I'm more than happy to submit code that adds Django 2.2 support, although I'm not really an expert on SQL Server.

JordanReiter avatar Apr 10 '19 15:04 JordanReiter

For everyone looking for 2.2 support - it's possible to simply change the version constraints and this driver installs properly. It works fine for my application but I don't know if there are any hidden problems that will come up later.

As noted at the top of the thread -- there are new features that Django will be checking for. It's not clear whether the defaults they have set in the base class match up with the feature support in SQL Server. So you may run into problems during things like bulk inserts, creating indexes, or using newer ORM features. It would probably be a good idea just to establish the correct values for the features listed as a first step towards Django 2.2 support.

JordanReiter avatar Apr 10 '19 15:04 JordanReiter

Apologize for the delay. I'm working on it and hope that I can publish a new version for Django 2.2 in this month.

michiya avatar Apr 10 '19 18:04 michiya

Needed here also, thanks for working on it!

danieltatrai avatar Apr 15 '19 15:04 danieltatrai

Are there any sub-issues that need to be tackled that would help close this one out? I'd be more than happy to help, as this project is very useful to some of my company's efforts.

seancallaway avatar May 07 '19 20:05 seancallaway

Any update on this @michiya ?

AshleyPoole avatar May 13 '19 16:05 AshleyPoole

Hi @michiya, would you be able to confirm 2.2 support is still in the pipeline? I'm happy to wait (and help if there's anything), however knowing it'll come at some point will help steer some support decisions.

soasuk avatar Jun 11 '19 07:06 soasuk

Hi @michiya, would you be able to confirm 2.2 support is still in the pipeline? I'm happy to wait (and help if there's anything), however knowing it'll come at some point will help steer some support decisions.

Maybe you can try #204 first.

yrchen avatar Jun 11 '19 08:06 yrchen

any update? would be much appreciated!

chachra avatar Jul 09 '19 06:07 chachra

Just checking in to see if there have been any updates on this... as we're looking to move to 2.2 as well.

hannylicious avatar Aug 01 '19 15:08 hannylicious

Hey folks who've been waiting, it looks like it is safe to say this project is no longer maintained.

I think it is time to try to bring support for SQL Server into Django core. This will require a community effort, and require us to continue to contribute. I've already seen a few forks of this project to bring in 2.2 compatibility, and rather than duplicating effort in forks, and creating confusion on PyPI, it'd be best if we get SQL Server support in Django itself.

I've started a fork of Django with an open issues list. I've merged some of the excellent work done to make django-pyodbc-azure compatible with Django 2.2 here:

https://github.com/FlipperPA/django-mssql-backend/tree/feature/add-mssql-backend

Today, I've gotten the backend running off of the latest Django master, version 3.0, with FreeTDS:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mssql',
        'NAME': 'django_test',
        'USER': 'django_test_user',
        'PASSWORD': '',
        'HOST': 'sql16-dev.myserver.com',
        'PORT': 1433,

        'OPTIONS': {
            'driver': 'FreeTDS',
            'TDS_Version': '7.4',
            'host_is_server': True,
        },
    },
}

There is a lot of work to do, and I've just scratched the surface of issues here: https://github.com/FlipperPA/django-mssql-backend/issues

Have a look, let me know what you think, add issues or PRs - we can make this happen, and finally put an end to the question of which fork of django-pyodbc to use.

For the Microsoft employees on the thread, it'd be great if we could get Microsoft to back this effort with a yearly donation to the Django Software Foundation and developer time! That would go a long way towards convincing the DSF that this is worth it, as the paid Django fellows will have to spend time maintaining this going forward for releases. It's a big ask to add another backend to the workload.

What do y'all think?

FlipperPA avatar Aug 10 '19 21:08 FlipperPA