-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Field reports figures into separate table
- Loading branch information
1 parent
a686800
commit 05f7f37
Showing
2 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 3.2.16 on 2022-11-03 15:15 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api', '0160_merge_0159_auto_20221022_1542_0159_auto_20221028_0940'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Figure', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('type', models.IntegerField(choices=[(0, 'Unknown'), (1, 'Affected'), (2, 'Potentially affected'), (3, 'Assisted'), (4, 'Dead'), (5, 'Displaced'), (6, 'Highest risk'), (7, 'Injured'), (8, 'Missing')], default=1, help_text='Type of figure', verbose_name='type')), | ||
('source', models.IntegerField(choices=[(1, 'Red Cross / Red Crescent'), (2, 'Government'), (3, 'Global Crisis Data Bank'), (4, 'UN'), (5, 'Other')], default=1, help_text='Source of figure', verbose_name='source')), | ||
('value', models.IntegerField(default=0, verbose_name='number of beneficiaries')), | ||
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created at')), | ||
('modified_at', models.DateTimeField(auto_now=True, verbose_name='modified at')), | ||
('field_report', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.fieldreport', verbose_name='Field report')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters