Skip to content

schema support #281

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 54 commits into
base: dev
Choose a base branch
from
Open

schema support #281

wants to merge 54 commits into from

Conversation

nasreddine27
Copy link

how to use:

  • in settings.py, change the default schema to use. Else dbo is used.
    DATABASES = {
    "default": {
    "ENGINE": "mssql",
    "NAME": "default",
    "USER": "sa",
    "PASSWORD": "MyPassword42",
    "HOST": "localhost",
    "PORT": "1433",
    "SCHEMA" :"dbo", # it will be used iso dbo
    "OPTIONS": {"driver": "ODBC Driver 17 for SQL Server", },
    }
    }
  • in models.py we can specify db_table_schema in meta class of the model :
    class Editor(BigAutoFieldMixin, models.Model):
    name = models.CharField(max_length=100)
    class Meta:
    db_table = 'editor'
    db_table_schema = 'test_schema'

maikhanhbui and others added 30 commits February 15, 2023 17:34
* Allow Django 4.2

* allow Django 4.2
…_type_sql() and collate_sql() functions (microsoft#229)

* fix error with raising fullresultset

* add django4.2 condition

* fix alter_column_type_sql and collate_sql to take 2 additional arguments

* delete argument 'old_rel_collation'

* fix arguments names
disable allows_group_by_select_index in `features.py`
* skip django 4.2 failing tests

* skip schema test

* skip aggregate annotation pruning test

---------

Co-authored-by: mShan0 <mark.shan19@gmail.com>
@GorlikItsMe
Copy link

Hi
Is there something blocking? What is needed to merge this changes?

… is used

The problem detected when there is a JOIN clause and the schema of the joined table is different from the parent one.
the solution is to treat each model separately.
@Th3xodial
Copy link

Pls we need this function

Copy link

@Th3xodial Th3xodial left a comment

Choose a reason for hiding this comment

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

I already use it on my server and it works great.

@Wedge009
Copy link

Hi Is there something blocking? What is needed to merge this changes?

Looks like this needs developer approval...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants