Code

Opened 8 years ago

Closed 8 years ago

#2563 closed defect (duplicate)

[patch] Full introspection functionality for ado_mssql backends

Reported by: sdelatorre+django@… Owned by: adrian
Component: Database layer (models, ORM) Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

This patch provides full introspection functionality for ado_mssql backends. It was tested on MSDE and SQL Server 2000 using adodbapi v. 2.0.1, Python 2.4.2, and Python 2.4.3. Using this patch, I was able to:

  • Obtain a list of tables from the database.
  • Obtain field information for each table.
  • Map each field to its corresponding Django model type (including AutoFields).
  • Retrieve relationship information.
  • Retrieve Index information.

I tested this patch on two fairly large legacy databases, and the resulting model definitions were correct in both instances.

When time permits, I'll also test the patch on SQL Server Express and SQL Server 2005.

Note: This patch is dependent upon the changes in Ticket #2358. I've tested the changes in that ticket, and so far I haven't run into any problems. The attached patch actually improves on the introspection changes introduced that ticket.

Attachments (1)

introspection.diff (7.4 KB) - added by sdelatorre+django@… 8 years ago.
The SVN diff of the patch.

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by sdelatorre+django@…

The SVN diff of the patch.

comment:1 Changed 8 years ago by sdelatorre+django@…

  • Resolution set to duplicate
  • Status changed from new to closed

Merged into Ticket #2358

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.