summaryrefslogtreecommitdiff
path: root/tests/postgres_tests/array_index_migrations
diff options
context:
space:
mode:
authorCaio Ariede <caio.ariede@gmail.com>2015-08-08 09:44:27 -0300
committerTim Graham <timograham@gmail.com>2015-08-15 10:02:08 -0400
commitdad8434d6ff5da10959672726dc9b397296d380b (patch)
tree035a70f167985e8f79d69d67c1b514604beb2f0b /tests/postgres_tests/array_index_migrations
parent7a40fef17ab7918cbb1ddc3ba080f42b420f7a48 (diff)
Fixed #25180 -- Prevented varchar_patterns_ops and text_patterns_ops indexes for ArrayField.
Diffstat (limited to 'tests/postgres_tests/array_index_migrations')
-rw-r--r--tests/postgres_tests/array_index_migrations/0001_initial.py26
-rw-r--r--tests/postgres_tests/array_index_migrations/__init__.py0
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/postgres_tests/array_index_migrations/0001_initial.py b/tests/postgres_tests/array_index_migrations/0001_initial.py
new file mode 100644
index 0000000000..8c7688ad44
--- /dev/null
+++ b/tests/postgres_tests/array_index_migrations/0001_initial.py
@@ -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,),
+ ),
+ ]
diff --git a/tests/postgres_tests/array_index_migrations/__init__.py b/tests/postgres_tests/array_index_migrations/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/postgres_tests/array_index_migrations/__init__.py