|
|
|
@ -2,8 +2,7 @@ |
|
|
|
# Generated by Django 1.11 on 2018-08-14 19:21 |
|
|
|
from __future__ import unicode_literals |
|
|
|
|
|
|
|
from django.db import migrations, models |
|
|
|
from statistics.fields import UnixDateTimeField |
|
|
|
from django.db import migrations |
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration): |
|
|
|
@ -14,17 +13,14 @@ class Migration(migrations.Migration): |
|
|
|
] |
|
|
|
|
|
|
|
operations = [ |
|
|
|
migrations.DeleteModel('StatCache'), |
|
|
|
migrations.CreateModel( |
|
|
|
name='StatCache', |
|
|
|
fields=[ |
|
|
|
('last_time', UnixDateTimeField()), |
|
|
|
('abon', models.OneToOneField(on_delete=models.deletion.CASCADE, primary_key=True, serialize=False, to='abonapp.Abon')), |
|
|
|
('octets', models.PositiveIntegerField(default=0)), |
|
|
|
('packets', models.PositiveIntegerField(default=0)), |
|
|
|
], |
|
|
|
options={ |
|
|
|
'db_table': 'flowcache', |
|
|
|
}, |
|
|
|
migrations.RunSQL( |
|
|
|
"DROP TABLE `flowcache`; " |
|
|
|
"CREATE TABLE `flowcache` ( " |
|
|
|
" `last_time` INT(10) UNSIGNED NOT NULL, " |
|
|
|
" `abon_id` INT(11) DEFAULT NULL UNIQUE, " |
|
|
|
" `octets` INT(10) UNSIGNED NOT NULL, " |
|
|
|
" `packets` INT(10) UNSIGNED NOT NULL, " |
|
|
|
" KEY `flowcache_abon_id_91e1085d` (`abon_id`) " |
|
|
|
") ENGINE = MEMORY DEFAULT CHARSET = utf8;" |
|
|
|
) |
|
|
|
] |