<reponame>coffeestats/coffeestats-django
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import django.utils.timezone
from django.conf import settings
import model_utils.fields
import django.core.validators


class Migration(migrations.Migration):
    dependencies = [
        ('auth', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(
                    verbose_name='ID', serialize=False, auto_created=True,
                    primary_key=True)),
                ('password', models.CharField(
                    max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(
                    default=django.utils.timezone.now,
                    verbose_name='last login')),
                ('is_superuser', models.BooleanField(
                    default=False,
                    help_text='Designates that this user has all permissions'
                              ' without explicitly assigning them.',
                    verbose_name='superuser status')),
                ('username', models.CharField(
                    help_text='Required. 30 characters or fewer. Letters,'
                              ' digits and @/./+/-/_ only.',
                    unique=True, max_length=30, verbose_name='username',
                    validators=[django.core.validators.RegexValidator(
                        '^[\\w.@+-]+$', 'Enter a valid username.',
                        'invalid')])),
                ('first_name', models.CharField(
                    max_length=30, verbose_name='first name', blank=True)),
                ('last_name', models.CharField(
                    max_length=30, verbose_name='last name', blank=True)),
                ('email', models.EmailField(
                    max_length=75, verbose_name='email address', blank=True)),
                ('is_staff', models.BooleanField(
                    default=False,
                    help_text='Designates whether the user can log into this'
                              ' admin site.',
                    verbose_name='staff status')),
                ('is_active', models.BooleanField(
                    default=True,
                    help_text='Designates whether this user should be treated'
                              ' as active. Unselect this instead of deleting'
                              ' accounts.',
                    verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(
                     default=django.utils.timezone.now,
                     verbose_name='date joined')),
                ('cryptsum', models.CharField(
                    max_length=60, verbose_name='old password hash',
                    blank=True)),
                ('location', models.CharField(max_length=128, blank=True)),
                ('public', models.BooleanField(default=True)),
                ('token', models.CharField(unique=True, max_length=32)),
                ('timezone', models.CharField(
                    db_index=True, max_length=40, verbose_name='timezone',
                    blank=True)),
                ('groups', models.ManyToManyField(
                    related_query_name='user', related_name='user_set',
                    to='auth.Group', blank=True,
                    help_text='The groups this user belongs to. A user will'
                              ' get all permissions granted to each of his/her'
                              ' group.',
                    verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     related_query_name='user', related_name='user_set',
                     to='auth.Permission', blank=True,
                     help_text='Specific permissions for this user.',
                     verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Action',
            fields=[
                ('id', models.AutoField(
                    verbose_name='ID', serialize=False, auto_created=True,
                    primary_key=True)),
                ('code', models.CharField(
                    unique=True, max_length=32, verbose_name='action code')),
                ('created', model_utils.fields.AutoCreatedField(
                    default=django.utils.timezone.now, verbose_name='created',
                    editable=False)),
                ('validuntil', models.DateTimeField(
                    verbose_name='valid until', db_index=True)),
                ('atype', models.PositiveSmallIntegerField(
                    db_index=True, verbose_name='action type',
                    choices=[(0, 'Change email')])),
                ('data', models.TextField(verbose_name='action data')),
                ('user', models.ForeignKey(
                    to=settings.AUTH_USER_MODEL, on_delete=models.PROTECT)),
            ],
            options={
                'ordering': ['-validuntil'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Caffeine',
            fields=[
                ('id', models.AutoField(
                    verbose_name='ID', serialize=False, auto_created=True,
                    primary_key=True)),
                ('ctype', models.PositiveSmallIntegerField(
                    db_index=True, choices=[(0, 'Coffee'), (1, 'Mate')])),
                ('date', models.DateTimeField(
                    verbose_name='consumed', db_index=True)),
                ('entrytime', model_utils.fields.AutoCreatedField(
                    default=django.utils.timezone.now, verbose_name='entered',
                    editable=False, db_index=True)),
                ('timezone',
                 models.CharField(db_index=True, max_length=40, blank=True)),
                ('user', models.ForeignKey(
                    to=settings.AUTH_USER_MODEL, on_delete=models.PROTECT)),
            ],
            options={
                'ordering': ['-date'],
            },
            bases=(models.Model,),
        ),
    ]

# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import django.utils.timezone
from django.conf import settings
import model_utils.fields
import django.core.validators


class Migration(migrations.Migration):
    dependencies = [
        ('auth', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(
                    verbose_name='ID', serialize=False, auto_created=True,
                    primary_key=True)),
                ('password', models.CharField(
                    max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(
                    default=django.utils.timezone.now,
                    verbose_name='last login')),
                ('is_superuser', models.BooleanField(
                    default=False,
                    help_text='Designates that this user has all permissions'
                              ' without explicitly assigning them.',
                    verbose_name='superuser status')),
                ('username', models.CharField(
                    help_text='Required. 30 characters or fewer. Letters,'
                              ' digits and @/./+/-/_ only.',
                    unique=True, max_length=30, verbose_name='username',
                    validators=[django.core.validators.RegexValidator(
                        '^[\\w.@+-]+$', 'Enter a valid username.',
                        'invalid')])),
                ('first_name', models.CharField(
                    max_length=30, verbose_name='first name', blank=True)),
                ('last_name', models.CharField(
                    max_length=30, verbose_name='last name', blank=True)),
                ('email', models.EmailField(
                    max_length=75, verbose_name='email address', blank=True)),
                ('is_staff', models.BooleanField(
                    default=False,
                    help_text='Designates whether the user can log into this'
                              ' admin site.',
                    verbose_name='staff status')),
                ('is_active', models.BooleanField(
                    default=True,
                    help_text='Designates whether this user should be treated'
                              ' as active. Unselect this instead of deleting'
                              ' accounts.',
                    verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(
                     default=django.utils.timezone.now,
                     verbose_name='date joined')),
                ('cryptsum', models.CharField(
                    max_length=60, verbose_name='old password hash',
                    blank=True)),
                ('location', models.CharField(max_length=128, blank=True)),
                ('public', models.BooleanField(default=True)),
                ('token', models.CharField(unique=True, max_length=32)),
                ('timezone', models.CharField(
                    db_index=True, max_length=40, verbose_name='timezone',
                    blank=True)),
                ('groups', models.ManyToManyField(
                    related_query_name='user', related_name='user_set',
                    to='auth.Group', blank=True,
                    help_text='The groups this user belongs to. A user will'
                              ' get all permissions granted to each of his/her'
                              ' group.',
                    verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     related_query_name='user', related_name='user_set',
                     to='auth.Permission', blank=True,
                     help_text='Specific permissions for this user.',
                     verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Action',
            fields=[
                ('id', models.AutoField(
                    verbose_name='ID', serialize=False, auto_created=True,
                    primary_key=True)),
                ('code', models.CharField(
                    unique=True, max_length=32, verbose_name='action code')),
                ('created', model_utils.fields.AutoCreatedField(
                    default=django.utils.timezone.now, verbose_name='created',
                    editable=False)),
                ('validuntil', models.DateTimeField(
                    verbose_name='valid until', db_index=True)),
                ('atype', models.PositiveSmallIntegerField(
                    db_index=True, verbose_name='action type',
                    choices=[(0, 'Change email')])),
                ('data', models.TextField(verbose_name='action data')),
                ('user', models.ForeignKey(
                    to=settings.AUTH_USER_MODEL, on_delete=models.PROTECT)),
            ],
            options={
                'ordering': ['-validuntil'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Caffeine',
            fields=[
                ('id', models.AutoField(
                    verbose_name='ID', serialize=False, auto_created=True,
                    primary_key=True)),
                ('ctype', models.PositiveSmallIntegerField(
                    db_index=True, choices=[(0, 'Coffee'), (1, 'Mate')])),
                ('date', models.DateTimeField(
                    verbose_name='consumed', db_index=True)),
                ('entrytime', model_utils.fields.AutoCreatedField(
                    default=django.utils.timezone.now, verbose_name='entered',
                    editable=False, db_index=True)),
                ('timezone',
                 models.CharField(db_index=True, max_length=40, blank=True)),
                ('user', models.ForeignKey(
                    to=settings.AUTH_USER_MODEL, on_delete=models.PROTECT)),
            ],
            options={
                'ordering': ['-date'],
            },
            bases=(models.Model,),
        ),
    ]
# -*- coding: utf-8 -*-