File: 0008_searchmodel.py

package info (click to toggle)
python-django-pgtrigger 4.15.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 956 kB
  • sloc: python: 4,412; makefile: 114; sh: 8; sql: 2
file content (28 lines) | stat: -rw-r--r-- 880 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Generated by Django 2.2 on 2022-08-10 19:13

import django.contrib.postgres.search
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("tests", "0007_auto_20220808_1055"),
    ]

    operations = [
        migrations.CreateModel(
            name="SearchModel",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("body_vector", django.contrib.postgres.search.SearchVectorField()),
                ("title_body_vector", django.contrib.postgres.search.SearchVectorField()),
                ("title", models.CharField(max_length=128)),
                ("body", models.TextField()),
            ],
        ),
    ]