Skip to content

schema support#281

Open
nasreddine27 wants to merge 54 commits into
microsoft:devfrom
nasreddine27:dev
Open

schema support#281
nasreddine27 wants to merge 54 commits into
microsoft:devfrom
nasreddine27:dev

Conversation

@nasreddine27
Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

Pls we need this function

Copy link
Copy Markdown

@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
Copy Markdown

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

Looks like this needs developer approval...

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.

7 participants