0001_initial.py
1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-11-15 22:36
from __future__ import unicode_literals
from decimal import Decimal
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Exercise',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('description', models.TextField(blank=True, verbose_name='Descrição')),
('init_date', models.DateField(verbose_name='Begin of Subject Date')),
('end_date', models.DateField(verbose_name='End of Subject Date')),
('grade', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=20, null=True)),
('name', models.CharField(max_length=100)),
],
),
migrations.CreateModel(
name='File',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('file', models.FileField(upload_to='uploads/%Y/%m/%d')),
('exercise', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='file', to='exercise.Exercise')),
],
),
]