1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

[1.11.x] Fixed #28451 -- Restored pre-Django 1.11 Oracle sequence/trigger naming.

Regression in 69b7d4b116.

Backport of c6a3546093 from master
This commit is contained in:
Kevin Grinberg
2017-08-22 17:41:25 -04:00
committed by Tim Graham
parent 60f81118f4
commit 90be8cf2a4
3 changed files with 18 additions and 4 deletions

View File

@@ -128,6 +128,14 @@ class OracleTests(unittest.TestCase):
cursor.execute(query)
self.assertEqual(cursor.fetchone()[0], 1)
def test_sequence_name_truncation(self):
seq_name = connection.ops._get_sequence_name('schema_authorwithevenlongee869')
self.assertEqual(seq_name, 'SCHEMA_AUTHORWITHEVENLOB0B8_SQ')
def test_trigger_name_truncation(self):
trigger_name = connection.ops._get_trigger_name('schema_authorwithevenlongee869')
self.assertEqual(trigger_name, 'SCHEMA_AUTHORWITHEVENLOB0B8_TR')
@unittest.skipUnless(connection.vendor == 'sqlite', "Test only for SQLite")
class SQLiteTests(TestCase):