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

[QUESTION] #384

Open
kdadhaniya opened this issue Apr 22, 2024 · 3 comments
Open

[QUESTION] #384

kdadhaniya opened this issue Apr 22, 2024 · 3 comments
Labels
question Further information is requested

Comments

@kdadhaniya
Copy link

Question

I am trying to makemigrations as I altered a model and added NULL=TRUE to one of the fields, but after doing makemigrations, I am getting this error:
django.db.utils.Error: ('IMC06', '[IMC06] [Microsoft][ODBC Driver 18 for SQL Server]The connection is broken and recovery is not possible. The connection is marked by the client driver as unrecoverable. No attempt was made to restore the connection. (0) (SQLExecDirectW)')
I have make previous migrations and have 8 migration files in my migrations folder
Relevant Issues and Pull Requests

@kdadhaniya kdadhaniya added the question Further information is requested label Apr 22, 2024
@mShan0
Copy link
Contributor

mShan0 commented Apr 22, 2024

Hi @kdadhaniya, can you provide the following information so we can investigate?

Software versions

  • Django:
  • mssql-django:
  • python:
  • SQL Server:
  • OS:

Table schema and Model

Database Connection Settings
// Paste your database settings from Settings.py here.

Steps to reproduce

Error message/stack trace

Any other details that can be helpful

@kdadhaniya
Copy link
Author

Software versions:
Django==5.0.4
mssql-django==1.4.2
Python: 3.10.13
SQL Server: Microsoft SQL Azure (RTM) - 12.0.2000.8 Feb 2 2024 04:20:23 Copyright (C) 2022 Microsoft Corporation
OS: Mac OS Sonoma 14.2.1

DATABASES = {
'default': {
'ENGINE': 'mssql',
'NAME': 'db_name', # Initial Catalog
'USER': 'user_name', # User ID
'PASSWORD': 'password', # Password
'HOST': 'server.database.windows.net', # Server
'PORT': '1433', # SQL Server default port

    'OPTIONS': {
        'driver': 'ODBC Driver 18 for SQL Server',
        'extra_params': 'Encrypt=yes;TrustServerCertificate=no;',
        'autocommit': True,
    },
},

}

@mShan0
Copy link
Contributor

mShan0 commented Apr 23, 2024

Can I see the models.py that is running into this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants