text: # Generated by Django 2.2.1 on 2019-05-26 05:31
  
  import django.db.models.deletion
  from django.db import migrations, models
  
  
  class Migration(migrations.Migration):
      initial = True
  
      dependencies = [
      ]
  
      operations = [
          migrations.CreateModel(
              name='Category',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=50)),
                  ('description', models.CharField(blank=True, max_length=200)),
                  ('rank', models.IntegerField(default=0, help_text='Smaller on top.')),
                  ('is_approved', models.BooleanField(default=True, help_text='Approved will be ready for showing.')),
                  ('is_show', models.BooleanField(default=True, help_text='Determine should show or not.')),
                  ('tags', models.CharField(blank=True, help_text='Split by comma: <em>,</em>', max_length=200)),
                  ('icon_class', models.CharField(default='linecons-star', help_text='The icon class for this category.',
                                                  max_length=20)),
                  ('created_on', models.DateTimeField(auto_now_add=True)),
                  ('created_by', models.CharField(default='System', max_length=100)),
                  ('updated_on', models.DateTimeField(auto_now=True)),
                  ('updated_by', models.CharField(default='System', max_length=100)),
                  ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT,
                                               to='pyindex.Category')),
              ],
          ),
          migrations.CreateModel(
              name='Link',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=50)),
                  ('description', models.CharField(max_length=200)),
                  ('link_type',
                   models.CharField(choices=[('email', 'EMAIL'), ('url', 'URL')], default='url', max_length=20)),
                  ('url', models.CharField(max_length=2000)),
                  ('icon', models.ImageField(blank=True, max_length=500, upload_to='site-icons/')),
                  ('keyword',
                   models.CharField(blank=True, help_text='Really short name as keyword, e.g. CMP', max_length=10)),
                  ('tags', models.CharField(blank=True, help_text='Split by comma: <em>,</em>', max_length=200)),
                  ('rank', models.IntegerField(default=0, help_text='Smaller on top.')),
                  ('is_approved', models.BooleanField(default=True, help_text='Approved will be ready for showing.')),
                  ('is_show', models.BooleanField(default=True, help_text='Determine should show or not.')),
                  ('created_on', models.DateTimeField(auto_now_add=True)),
                  ('created_by', models.CharField(default='System', max_length=100)),
                  ('updated_on', models.DateTimeField(auto_now=True)),
                  ('updated_by', models.CharField(default='System', max_length=100)),
                  ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='pyindex.Category')),
              ],
          ),
          migrations.CreateModel(
              name='Hit',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('times', models.IntegerField(default=1)),
                  ('created_on', models.DateTimeField(auto_now_add=True)),
                  ('created_by', models.CharField(default='System', max_length=100)),
                  ('updated_on', models.DateTimeField(auto_now=True)),
                  ('updated_by', models.CharField(default='System', max_length=100)),
                  ('link', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pyindex.Link')),
              ],
          ),
      ]
  