mirror of
https://github.com/django/django.git
synced 2025-07-19 03:05:32 +00:00
Fixed #25180 -- Prevented varchar_patterns_ops and text_patterns_ops indexes for ArrayField.
This commit is contained in:
parent
7a40fef17a
commit
dad8434d6f
5 changed files with 61 additions and 0 deletions
26
tests/postgres_tests/array_index_migrations/0001_initial.py
Normal file
26
tests/postgres_tests/array_index_migrations/0001_initial.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import django.contrib.postgres.fields
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='CharTextArrayIndexModel',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('char', django.contrib.postgres.fields.ArrayField(models.CharField(max_length=10), db_index=True, size=100)),
|
||||
('char2', models.CharField(max_length=11, db_index=True)),
|
||||
('text', django.contrib.postgres.fields.ArrayField(models.TextField(), db_index=True)),
|
||||
],
|
||||
options={
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue