Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#24177 closed Cleanup/optimization (fixed)

Docs. inspectdb now inspect the database view

Reported by: Fabio Caritas Barrionuevo da Luz Owned by: Tim Graham
Component: Documentation Version: 1.8alpha1
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Hello, recently, in the commit https://github.com/django/django/commit/b8cdc7dcc3fc6897fb2a75f90023f5c67aad327f support was added for the "database view" in the inspectdb management command, However, this was not documented.

this pull-request fix this: https://github.com/django/django/pull/3946

Change History (9)

comment:1 Changed 3 years ago by Markus Holtermann

Has patch: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

comment:2 Changed 3 years ago by Tim Graham

Needs tests: set

I think we also need to add a test to confirm this feature.

comment:3 in reply to:  2 Changed 3 years ago by Josh Smeaton

Replying to timgraham:

I think we also need to add a test to confirm this feature.

A test was added when cross database support was added for Oracle. Fairly sure this should cover it.

https://github.com/django/django/blob/b84100e8e22b175b62ce849acbcf1fa9a1e0e5b8/tests/introspection/tests.py#L39

comment:4 Changed 3 years ago by Tim Graham

Needs tests: unset
Owner: changed from nobody to Tim Graham
Patch needs improvement: unset
Status: newassigned
Triage Stage: AcceptedReady for checkin

Great, I'll do a light edit on the English and commit this then.

comment:5 Changed 3 years ago by Fabio Caritas Barrionuevo da Luz

Sorry for the mistakes, english is not my native language. I still have quite a lot to learn.

I added the corrections suggested by MarkusH.
See: https://github.com/django/django/pull/3946/commits

As this new feature is included, I believe it is necessary to differentiate a model generated from a table and a model generated from a view. Add a simple comment "maps a view" (or other text) in the generated class already solves it.

If, in the future, django offer support for "synonym" feature of Oracle, differentiate this can be useful.

In my specific case, the company I started working on last mont, has an Oracle database with at least 67 schemas, and over 4320 tables, views and synonym. The database of this size, differentiate what is table, what is view and what is synonym becomes quite useful.

comment:6 Changed 3 years ago by Markus Holtermann <info@…>

Resolution: fixed
Status: assignedclosed

In bd691f4586c8ad45bd059ff9d3621cbf8afdcdce:

Fixed #24177 -- Added documentation about database view support in inspectdb

comment:7 Changed 3 years ago by Markus Holtermann <info@…>

In e69eea73d94c058728143416058a6257c765a9b8:

[1.8.x] Fixed #24177 -- Added documentation about database view support in inspectdb

Backport of bd691f4586c8ad45bd059ff9d3621cbf8afdcdce from master

comment:8 Changed 2 years ago by Tim Graham <timograham@…>

In 9f0d6713:

Fixed #25038 -- Reverted incorrect documentation about inspectdb introspecting views.

This reverts commit bd691f4586c8ad45bd059ff9d3621cbf8afdcdce (refs #24177).

comment:9 Changed 2 years ago by Tim Graham <timograham@…>

In fdaf935:

[1.8.x] Fixed #25038 -- Reverted incorrect documentation about inspectdb introspecting views.

This reverts commit e69eea73d94c058728143416058a6257c765a9b8 (refs #24177).

Note: See TracTickets for help on using tickets.
Back to Top