heima/sherlock/migrations/0001_initial.py

42 lines
1.4 KiB
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-04 19:10
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, unique=True)),
],
),
migrations.CreateModel(
name='Gauge',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('serial_number', models.CharField(max_length=40)),
('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sherlock.Category')),
],
),
migrations.CreateModel(
name='Mesure',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moment', models.DateTimeField()),
('value', models.DecimalField(decimal_places=4, max_digits=10)),
('gauge', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sherlock.Gauge')),
],
),
]