yig/franklincce/explorer/migrations/0001_initial.py

88 lines
4.2 KiB
Python
Raw Normal View History

2024-07-24 01:38:24 -05:00
# Generated by Django 4.2.14 on 2024-07-24 06:38
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Country',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256)),
],
options={
'verbose_name_plural': 'Countries',
},
),
migrations.CreateModel(
name='LegislationBook',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('conference_type', models.CharField(choices=[('M', 'Middle School'), ('H', 'High School')], default='H', max_length=1)),
('pdf', models.FileField(upload_to='uploads/')),
('name', models.CharField(max_length=256)),
('import_strategy', models.CharField(choices=[('HSYIGBookParser', 'High School YIG Book Parser 1'), ('HSMUNBookParser', 'High School MUN Book Parser 1')], default='HSYIGBookParser', max_length=128)),
('has_performed_export', models.BooleanField(default=False)),
],
options={
'verbose_name': 'Book',
'verbose_name_plural': 'Books',
},
),
migrations.CreateModel(
name='LegislationClassification',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(help_text='Name of this classification.', max_length=256)),
('text_to_match', models.CharField(help_text='a comma seperated list of keywords to include in the classification. spaces and dashes are discluded.', max_length=256)),
],
options={
'verbose_name': 'Topic',
'verbose_name_plural': 'Topics',
},
),
migrations.CreateModel(
name='School',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256)),
],
),
migrations.CreateModel(
name='Sponsor',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256)),
],
),
migrations.CreateModel(
name='LegislativeText',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('assembly', models.CharField(choices=[('RGA', 'Red General Assembly'), ('BGA', 'Blue General Assembly'), ('WGA', 'White General Assembly'), ('RHB', 'Red House'), ('BHB', 'Blue House'), ('WHB', 'White House'), ('RSB', 'Red Senate'), ('BSB', 'Blue Senate'), ('WSB', 'White Senate'), ('SEN', 'Senate'), ('HOU', 'House'), ('GEN', 'General Assembly')], default='GEN', max_length=3)),
('text', models.TextField()),
('year', models.IntegerField()),
('committee', models.IntegerField()),
('category', models.CharField(max_length=256)),
('docket_order', models.IntegerField()),
('legislation_title', models.CharField(max_length=512)),
('country', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='explorer.country')),
('from_book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='explorer.legislationbook')),
('school', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='explorer.school')),
('sponsors', models.ManyToManyField(blank=True, to='explorer.sponsor')),
],
options={
'verbose_name': 'Legislation',
'verbose_name_plural': 'Legislation',
},
),
]