71 lines
3.8 KiB
Python
71 lines
3.8 KiB
Python
# Generated by Django 5.2.7 on 2026-01-24 03:04
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Voter',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('voter_id', models.CharField(max_length=50, unique=True)),
|
|
('first_name', models.CharField(max_length=100)),
|
|
('last_name', models.CharField(max_length=100)),
|
|
('address', models.TextField()),
|
|
('phone', models.CharField(blank=True, max_length=20, null=True)),
|
|
('email', models.EmailField(blank=True, max_length=254, null=True)),
|
|
('district', models.CharField(blank=True, max_length=100, null=True)),
|
|
('precinct', models.CharField(blank=True, max_length=100, null=True)),
|
|
('registration_date', models.DateField(blank=True, null=True)),
|
|
('likelihood_to_vote', models.IntegerField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5')], default=3)),
|
|
('candidate_support', models.CharField(choices=[('unknown', 'Unknown'), ('supporting', 'Supporting'), ('not_supporting', 'Not Supporting')], default='unknown', max_length=20)),
|
|
('yard_sign_status', models.CharField(choices=[('none', 'None'), ('wants', 'Wants a Yard Sign'), ('has', 'Has a Yard Sign')], default='none', max_length=20)),
|
|
('latitude', models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True)),
|
|
('longitude', models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
],
|
|
options={
|
|
'ordering': ['last_name', 'first_name'],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Donation',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('donation_date', models.DateField()),
|
|
('amount', models.DecimalField(decimal_places=2, max_digits=10)),
|
|
('voter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='donations', to='core.voter')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='VoterContact',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('contact_type', models.CharField(choices=[('Phone', 'Phone'), ('Door Visit', 'Door Visit'), ('Mail', 'Mail')], max_length=20)),
|
|
('contact_date', models.DateTimeField()),
|
|
('description', models.CharField(max_length=255)),
|
|
('notes', models.TextField(blank=True, null=True)),
|
|
('voter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contacts', to='core.voter')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='VotingRecord',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('election_date', models.DateField()),
|
|
('description', models.CharField(max_length=255)),
|
|
('primary_party', models.CharField(blank=True, max_length=50, null=True)),
|
|
('voter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='voting_records', to='core.voter')),
|
|
],
|
|
),
|
|
]
|