mirror of
https://github.com/django/django.git
synced 2025-07-05 02:09:13 +00:00
[boulder-oracle-sprint] fixed trigger names with truncate_name
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
86b9b25fb3
commit
e72e040102
@ -203,7 +203,7 @@ def _get_sql_model_create(model, known_models=set()):
|
||||
sequence_statement = 'CREATE SEQUENCE %s;' % sequence_name
|
||||
final_output.append(sequence_statement)
|
||||
trigger_statement = '' + \
|
||||
'CREATE OR REPLACE trigger %s_tr\n' % opts.db_table + \
|
||||
'CREATE OR REPLACE trigger %s\n' % truncate_name('%s_tr' % opts.db_table, backend.get_max_name_length()) + \
|
||||
' before insert on %s\n' % backend.quote_name(opts.db_table) + \
|
||||
' for each row\n' + \
|
||||
' when (new.id is NULL)\n' + \
|
||||
@ -282,7 +282,7 @@ def _get_many_to_many_sql_for_model(model):
|
||||
sequence_statement = 'CREATE SEQUENCE %s;' % sequence_name
|
||||
final_output.append(sequence_statement)
|
||||
trigger_statement = '' + \
|
||||
'CREATE OR REPLACE trigger %s_tr\n' % m_table + \
|
||||
'CREATE OR REPLACE trigger %s\n' % truncate_name('%s_tr' % m_table, backend.get_max_name_length()) + \
|
||||
' before insert on %s\n' % backend.quote_name(m_table) + \
|
||||
' for each row\n' + \
|
||||
' when (new.id is NULL)\n' + \
|
||||
|
Loading…
x
Reference in New Issue
Block a user