From 01fd09f3c7d265ad5debb7e4fc78ab17ec7341b6 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 31 May 2021 15:38:35 +0200 Subject: [PATCH 1/1] A migration. --- src/stats/migrations/0001_initial.py | 27 +++++++++++++++++++++++++++ src/stats/migrations/__init__.py | 0 2 files changed, 27 insertions(+) create mode 100644 src/stats/migrations/0001_initial.py create mode 100644 src/stats/migrations/__init__.py diff --git a/src/stats/migrations/0001_initial.py b/src/stats/migrations/0001_initial.py new file mode 100644 index 000000000..691701b0b --- /dev/null +++ b/src/stats/migrations/0001_initial.py @@ -0,0 +1,27 @@ +# Generated by Django 2.2.19 on 2021-05-31 13:36 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('catalogue', '0032_collection_listed'), + ] + + operations = [ + migrations.CreateModel( + name='Visits', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('year', models.PositiveSmallIntegerField()), + ('month', models.PositiveSmallIntegerField()), + ('views', models.IntegerField()), + ('unique_views', models.IntegerField()), + ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalogue.Book')), + ], + ), + ] diff --git a/src/stats/migrations/__init__.py b/src/stats/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb -- 2.20.1