telegram_bots/bots/migrations/0001_squashed_0025_auto_20210311_2341.py
2021-03-11 23:43:54 +03:00

192 lines
9.3 KiB
Python

# Generated by Django 3.1.7 on 2021-03-11 20:43
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
replaces = [('bots', '0001_initial'), ('bots', '0002_echobotmoduleconfig'), ('bots', '0003_telegrambot_active'), ('bots', '0004_auto_20191112_1908'), ('bots', '0005_channelhelperbotmoduleconfig'), ('bots', '0006_overlaybotmoduleconfig'), ('bots', '0007_auto_20191116_0314'), ('bots', '0008_auto_20191124_1922'), ('bots', '0009_auto_20191126_0058'), ('bots', '0010_auto_20191126_0112'), ('bots', '0011_auto_20191127_2117'), ('bots', '0012_auto_20191127_2139'), ('bots', '0013_auto_20191127_2214'), ('bots', '0014_auto_20191127_2223'), ('bots', '0015_cyberlinabotmoduleconfig_mtg_train_new'), ('bots', '0016_auto_20191128_0011'), ('bots', '0017_auto_20191128_0012'), ('bots', '0018_overlayimage'), ('bots', '0019_remove_overlaybotmoduleconfig_image'), ('bots', '0020_pingbotcategory_pingbotmoduleconfig'), ('bots', '0021_auto_20200212_2022'), ('bots', '0022_auto_20200505_1146'), ('bots', '0023_overlaybotmoduleconfig_send_avatar_on_start'), ('bots', '0024_spoilerbotmoduleconfig_spoilermessage'), ('bots', '0025_auto_20210311_2341')]
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contenttypes', '0002_remove_content_type_name'),
]
operations = [
migrations.CreateModel(
name='EchoBotModuleConfig',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('prefix', models.TextField()),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='TelegramBot',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=32)),
('bot_token', models.CharField(max_length=256)),
('config_id', models.PositiveIntegerField()),
('config_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
('active', models.BooleanField(default=True)),
('periodic_interval', models.DurationField(blank=True, null=True)),
('periodic_last_run', models.DateTimeField(blank=True, null=True)),
('rpc_name', models.CharField(blank=True, max_length=32, null=True)),
],
options={
'unique_together': {('config_type', 'config_id')},
},
),
migrations.CreateModel(
name='OverlayBotModuleConfig',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('comment', models.TextField(blank=True, null=True)),
('start_text', models.TextField(blank=True, null=True)),
('type_error_text', models.TextField(blank=True, null=True)),
('send_avatar_on_start', models.BooleanField(default=False)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='ChannelHelperBotModuleConfig',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('chat_id', models.CharField(max_length=32)),
('queued', models.BooleanField(default=False)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='QueuedItem',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('type', models.CharField(max_length=12)),
('args', models.TextField()),
('config', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='queued_items', to='bots.channelhelperbotmoduleconfig')),
],
),
migrations.CreateModel(
name='CyberLinaBotModuleConfig',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('first_part', models.JSONField(default=list)),
('second_part', models.JSONField(default=list)),
('third_part', models.JSONField(default=list)),
('emoji', models.JSONField(default=list)),
('already_ran', models.JSONField(default=list)),
('welcome_reactions', models.JSONField(default=list)),
('inline_reactions', models.JSONField(default=list)),
('_mtg_data', models.JSONField(blank=True, default=dict, null=True)),
('_mtg_corpus', models.TextField(blank=True, null=True)),
('mtg_train', models.TextField(blank=True, null=True)),
],
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')},
),
migrations.CreateModel(
name='OverlayImage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('image', models.ImageField(upload_to='')),
('config', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='bots.overlaybotmoduleconfig')),
],
),
migrations.CreateModel(
name='PingBotModuleConfig',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('no_users_text', models.TextField(default='No users found')),
('message_template', models.TextField(default='{mentions}')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='ChannelHelperUser',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=32)),
('user_id', models.BigIntegerField(db_index=True)),
],
),
migrations.AddField(
model_name='channelhelperbotmoduleconfig',
name='users',
field=models.ManyToManyField(to='bots.ChannelHelperUser'),
),
migrations.CreateModel(
name='SpoilerBotModuleConfig',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='SpoilerMessage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.TextField()),
],
),
migrations.CreateModel(
name='PingBotCategory',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('chat_id', models.BigIntegerField(db_index=True)),
('cat_name', models.CharField(db_index=True, max_length=64)),
('user_ids', models.JSONField(null=True)),
],
options={
'unique_together': {('chat_id', 'cat_name')},
},
),
]