mirror of
https://github.com/django/django.git
synced 2025-09-01 08:17:37 +00:00
Fixed #30511 -- Used identity columns instead of serials on PostgreSQL.
This commit is contained in:
parent
62ffc9883a
commit
2eea361eff
7 changed files with 90 additions and 95 deletions
|
@ -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",
|
||||
}
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue