Modify

Ticket #755 (assigned defect)

Opened 3 years ago

Last modified 3 years ago

Oracle DB does not work , sql incorrect.

Reported by: saffi.public@… Owned by: andrew
Priority: major Milestone: 1.0
Component: databaseapi Version: 0.7.3
Keywords: oracle Cc:

Description

The issue having "unique" with "defaults".
site-packages\south\db\generic.py
def column_sql(self, table_name, field_name, field, tablespace=, with_name=True, field_prepared=False):

Instead of :

elif (not field.null and field.blank) or (field.get_default() == ''):

the change:

elif (not field.unique and not field.null and field.blank) or (not field.unique and field.get_default() == ''):

It didn't like unique with default … which makes sense
I should have done it :

elif not field.unique and ((not field.null and field.blank) or (field.get_default() == '')):

Attachments

patch_south.py (5.0 KB) - added by saffi.public@… 3 years ago.
Monkey patching - support oracle: tablespace+(unique default collision)

Change History

Changed 3 years ago by saffi.public@…

Monkey patching - support oracle: tablespace+(unique default collision)

comment:1 Changed 3 years ago by andrew

  • Status changed from new to assigned
  • Milestone set to 1.0

I can't accept a monkeypatching Python file as bugfix code; if you could make the change as a diff against the main South source tree, I can review or apply it, otherwise this will have to wait until I have free time to fix it.

View

Add a comment

Modify Ticket

Action
as assigned
Author


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

 
Note: See TracTickets for help on using tickets.