bia-fitness/lifting/migrations/0001_initial.py

39 lines
1.7 KiB
Python
Raw Normal View History

2015-03-31 21:25:19 +00:00
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
2015-04-01 20:39:02 +00:00
import django.contrib.postgres.fields
2015-04-10 18:19:12 +00:00
from django.conf import settings
2015-03-31 21:25:19 +00:00
class Migration(migrations.Migration):
dependencies = [
2015-04-10 18:19:12 +00:00
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('inventory', '0001_initial'),
2015-03-31 21:25:19 +00:00
]
operations = [
migrations.CreateModel(
2015-04-10 18:19:12 +00:00
name='LiftingOptions',
2015-03-31 21:25:19 +00:00
fields=[
2015-04-10 18:19:12 +00:00
('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)),
('lifting_units', models.CharField(default='i', choices=[('m', 'Metric (kg)'), ('i', 'Imperial (lb)')], max_length=1)),
('plate_pairs', django.contrib.postgres.fields.ArrayField(base_field=models.DecimalField(max_digits=7, decimal_places=3), default=['45', '45', '25', '10', '5', '5', '2.5', '1.25'], size=None)),
('user', models.OneToOneField(related_name='lifting_options', to=settings.AUTH_USER_MODEL)),
2015-03-31 21:25:19 +00:00
],
),
migrations.CreateModel(
name='Set',
fields=[
2015-04-10 18:19:12 +00:00
('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)),
2015-03-31 21:25:19 +00:00
('date', models.DateField()),
2015-04-10 18:19:12 +00:00
('weight_kg', models.DecimalField(max_digits=7, decimal_places=3)),
2015-03-31 21:25:19 +00:00
('reps', models.PositiveIntegerField()),
('source', models.CharField(max_length=100)),
2015-04-10 18:19:12 +00:00
('lift', models.ForeignKey(related_name='sets', to='inventory.Lift')),
('user', models.ForeignKey(related_name='sets', to=settings.AUTH_USER_MODEL)),
2015-03-31 21:25:19 +00:00
],
),
]