Ticket #1373: newfix_drop_foreignkey.diff
File newfix_drop_foreignkey.diff, 2.7 KB (added by , 19 years ago) |
---|
-
db/backends/ado_mssql/base.py
121 121 def get_random_function_sql(): 122 122 return "RAND()" 123 123 124 def get_drop_foreignkey_sql(): 125 return "DROP CONSTRAINT" 126 124 127 OPERATOR_MAPPING = { 125 128 'exact': '= %s', 126 129 'iexact': 'LIKE %s', -
db/backends/postgresql/base.py
98 98 def get_random_function_sql(): 99 99 return "RANDOM()" 100 100 101 def get_drop_foreignkey_sql(): 102 return "DROP CONSTRAINT" 103 101 104 # Register these custom typecasts, because Django expects dates/times to be 102 105 # in Python's native (standard-library) datetime/time format, whereas psycopg 103 106 # use mx.DateTime by default. -
db/backends/sqlite3/base.py
116 116 def get_random_function_sql(): 117 117 return "RANDOM()" 118 118 119 def get_drop_foreignkey_sql(): 120 return "" 121 119 122 def _sqlite_date_trunc(lookup_type, dt): 120 123 try: 121 124 dt = util.typecast_timestamp(dt) -
db/backends/mysql/base.py
146 146 def get_random_function_sql(): 147 147 return "RAND()" 148 148 149 def get_drop_foreignkey_sql(): 150 return "DROP FOREIGN KEY" 151 149 152 OPERATOR_MAPPING = { 150 153 'exact': '= %s', 151 154 'iexact': 'LIKE %s', -
db/backends/dummy/base.py
33 33 get_date_trunc_sql = complain 34 34 get_limit_offset_sql = complain 35 35 get_random_function_sql = complain 36 get_drop_foreignkey_sql = complain 36 37 OPERATOR_MAPPING = {} -
core/management.py
290 290 output.append('%s %s %s %s;' % \ 291 291 (style.SQL_KEYWORD('ALTER TABLE'), 292 292 style.SQL_TABLE(backend.quote_name(table)), 293 style.SQL_KEYWORD( 'DROP CONSTRAINT'),293 style.SQL_KEYWORD(backend.get_drop_foreignkey_sql()), 294 294 style.SQL_FIELD(backend.quote_name("%s_referencing_%s_%s" % (col, r_table, r_col))))) 295 295 del references_to_delete[klass] 296 296