12345678910111213141516171819202122232425262728293031323334353637 |
- # Generated by Django 3.2.5 on 2021-07-08 17:28
- from django.conf import settings
- from django.db import migrations, models
- import django.db.models.deletion
- class Migration(migrations.Migration):
- initial = True
- dependencies = [
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ]
- operations = [
- migrations.CreateModel(
- name='Profile',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('phone', models.CharField(blank=True, max_length=20)),
- ('bio', models.TextField(blank=True, max_length=500)),
- ('avatar', models.ImageField(blank=True, upload_to='avatar/%Y%m%d/')),
- ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
- ],
- ),
- migrations.CreateModel(
- name='Devices',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('last_login_time', models.DateField(auto_now=True)),
- ('device_uid', models.CharField(default='233', max_length=100, unique=True)),
- ('token', models.CharField(default='233', max_length=100, unique=True)),
- ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='devices', to=settings.AUTH_USER_MODEL)),
- ],
- ),
- ]
|