From db530d98fd390f938da279f528bb3a4e968e6891 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Wed, 12 Feb 2020 20:19:16 +0300 Subject: [PATCH] add migrations --- ...020_pingbotcategory_pingbotmoduleconfig.py | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 bots/migrations/0020_pingbotcategory_pingbotmoduleconfig.py diff --git a/bots/migrations/0020_pingbotcategory_pingbotmoduleconfig.py b/bots/migrations/0020_pingbotcategory_pingbotmoduleconfig.py new file mode 100644 index 0000000..196af09 --- /dev/null +++ b/bots/migrations/0020_pingbotcategory_pingbotmoduleconfig.py @@ -0,0 +1,38 @@ +# Generated by Django 3.0rc1 on 2020-02-12 17:16 + +from django.db import migrations, models +import jsonfield.encoder +import jsonfield.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('bots', '0019_remove_overlaybotmoduleconfig_image'), + ] + + operations = [ + 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='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', jsonfield.fields.JSONField(default='[]', dump_kwargs={'cls': jsonfield.encoder.JSONEncoder, 'separators': (',', ':')}, load_kwargs={})), + ], + options={ + 'unique_together': {('chat_id', 'cat_name')}, + }, + ), + ]