ba-thesis/app/withings/migrations/0001_initial.py

42 lines
1.7 KiB
Python
Raw Normal View History

2023-07-30 22:51:55 +01:00
# Generated by Django 4.2.3 on 2023-07-30 21:15
2023-07-27 15:37:18 +01:00
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
]
operations = [
migrations.CreateModel(
name='ApiAccount',
fields=[
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
('userid', models.PositiveIntegerField(verbose_name='Withings API User ID')),
('last_update', models.DateTimeField(default=None, null=True, verbose_name='Time of last synchronization with Withings API')),
2023-07-27 15:37:18 +01:00
],
),
migrations.CreateModel(
name='AccessToken',
fields=[
('account', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='withings.apiaccount')),
('value', models.CharField(max_length=256, verbose_name='Withings API Access Token')),
('expires', models.DateTimeField(verbose_name='Time of expiration')),
],
),
migrations.CreateModel(
name='RefreshToken',
fields=[
('account', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='withings.apiaccount')),
('value', models.CharField(max_length=256, verbose_name='Withings API Refresh Token')),
('expires', models.DateTimeField(verbose_name='Time of expiration')),
],
),
]