telegram_bots/bots/migrations/0009_auto_20191126_0058.py
2019-11-27 21:21:24 +03:00

64 lines
3.3 KiB
Python

# Generated by Django 3.0rc1 on 2019-11-25 21:58
from django.db import migrations, models
import django.db.models.deletion
import jsonfield.encoder
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('bots', '0008_auto_20191124_1922'),
]
operations = [
migrations.CreateModel(
name='CyberLinaBotModuleConfig',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('first_part', jsonfield.fields.JSONField(default=[], dump_kwargs={'cls': jsonfield.encoder.JSONEncoder, 'separators': (',', ':')}, load_kwargs={})),
('second_part', jsonfield.fields.JSONField(default=[], dump_kwargs={'cls': jsonfield.encoder.JSONEncoder, 'separators': (',', ':')}, load_kwargs={})),
('third_part', jsonfield.fields.JSONField(default=[], dump_kwargs={'cls': jsonfield.encoder.JSONEncoder, 'separators': (',', ':')}, load_kwargs={})),
('emoji', jsonfield.fields.JSONField(default=[], dump_kwargs={'cls': jsonfield.encoder.JSONEncoder, 'separators': (',', ':')}, load_kwargs={})),
('already_ran', jsonfield.fields.JSONField(default=[], dump_kwargs={'cls': jsonfield.encoder.JSONEncoder, 'separators': (',', ':')}, load_kwargs={})),
('welcome_reactions', jsonfield.fields.JSONField(default=[], dump_kwargs={'cls': jsonfield.encoder.JSONEncoder, 'separators': (',', ':')}, load_kwargs={})),
('inline_reactions', jsonfield.fields.JSONField(default=[], dump_kwargs={'cls': jsonfield.encoder.JSONEncoder, 'separators': (',', ':')}, load_kwargs={})),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CyberLinaChat',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.TextField()),
('chat_id', models.BigIntegerField(db_index=True)),
('last_run', models.DateField(blank=True, null=True)),
('config', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chats', to='bots.CyberLinaBotModuleConfig')),
],
),
migrations.CreateModel(
name='CyberLinaUser',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('user_id', models.BigIntegerField(db_index=True)),
('name', models.TextField()),
('chat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='users', to='bots.CyberLinaChat')),
],
options={
'unique_together': {('chat', 'user_id')},
},
),
migrations.AddField(
model_name='cyberlinachat',
name='last_choice',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='bots.CyberLinaUser'),
),
migrations.AlterUniqueTogether(
name='cyberlinachat',
unique_together={('config', 'chat_id')},
),
]