ernestophone.ens.fr/partitions/migrations/0001_initial.py
2018-01-05 00:08:20 +01:00

36 lines
1.4 KiB
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Partition',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)),
('nom', models.CharField(max_length=100)),
('part', models.FileField(upload_to='partitions/')),
],
),
migrations.CreateModel(
name='PartitionSet',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)),
('nom', models.CharField(max_length=100)),
('auteur', models.CharField(max_length=100)),
('category', models.CharField(max_length=8, choices=[('active', 'Actif'), ('incoming', 'À venir'), ('old', 'Archive'), ('optional', 'Optionnel')], default='incoming', verbose_name='Types de partitions')),
('infos', models.TextField(blank=True, verbose_name='Infos utiles', null=True)),
],
),
migrations.AddField(
model_name='partition',
name='morceau',
field=models.ForeignKey(to='partitions.PartitionSet', on_delete=models.CASCADE),
),
]