summaryrefslogtreecommitdiff
path: root/tests/backends/postgresql
diff options
context:
space:
mode:
Diffstat (limited to 'tests/backends/postgresql')
-rw-r--r--tests/backends/postgresql/test_introspection.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/backends/postgresql/test_introspection.py b/tests/backends/postgresql/test_introspection.py
index dc95d6ad23..2dfb7514d6 100644
--- a/tests/backends/postgresql/test_introspection.py
+++ b/tests/backends/postgresql/test_introspection.py
@@ -27,3 +27,18 @@ class DatabaseSequenceTests(TestCase):
seqs,
[{"table": Person._meta.db_table, "column": "id", "name": "pers_seq"}],
)
+
+ def test_get_sequences_old_serial(self):
+ with connection.cursor() as cursor:
+ cursor.execute("CREATE TABLE testing (serial_field SERIAL);")
+ seqs = connection.introspection.get_sequences(cursor, "testing")
+ self.assertEqual(
+ seqs,
+ [
+ {
+ "table": "testing",
+ "column": "serial_field",
+ "name": "testing_serial_field_seq",
+ }
+ ],
+ )