OpenSlides/server/openslides/users/migrations/0005_personalnote_rework.py

46 lines
1.4 KiB
Python
Raw Normal View History

2017-05-23 14:07:06 +02:00
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-05-23 11:25
from __future__ import unicode_literals
import django.db.models.deletion
import jsonfield.fields
from django.conf import settings
from django.db import migrations, models
import openslides.utils.models
class Migration(migrations.Migration):
2019-01-06 16:22:33 +01:00
dependencies = [("users", "0004_personalnote")]
2017-05-23 14:07:06 +02:00
operations = [
2019-01-06 16:22:33 +01:00
migrations.RemoveField(model_name="personalnote", name="content_type"),
migrations.RemoveField(model_name="personalnote", name="user"),
migrations.DeleteModel(name="PersonalNote"),
2017-05-23 14:07:06 +02:00
migrations.CreateModel(
2019-01-06 16:22:33 +01:00
name="PersonalNote",
2017-05-23 14:07:06 +02:00
fields=[
2019-01-06 16:22:33 +01:00
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("notes", jsonfield.fields.JSONField()),
(
"user",
models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
),
),
2017-05-23 14:07:06 +02:00
],
2019-01-06 16:22:33 +01:00
options={"default_permissions": ()},
2017-05-23 14:07:06 +02:00
bases=(openslides.utils.models.RESTModelMixin, models.Model),
),
]