-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add farm group * Fix tests
- Loading branch information
Showing
13 changed files
with
432 additions
and
60 deletions.
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 |
---|---|---|
@@ -1 +1 @@ | ||
0.0.1 | ||
0.0.2 |
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
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
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
53 changes: 53 additions & 0 deletions
53
django_project/gap/migrations/0020_farmgroup_remove_cropinsightrequest_farms_and_more.py
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,53 @@ | ||
# Generated by Django 4.2.7 on 2024-09-20 05:51 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('gap', '0019_grid'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='FarmGroup', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=512)), | ||
('description', models.TextField(blank=True, null=True)), | ||
('farms', models.ManyToManyField(to='gap.farm')), | ||
('users', models.ManyToManyField(to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'ordering': ['name'], | ||
'abstract': False, | ||
}, | ||
), | ||
migrations.RemoveField( | ||
model_name='cropinsightrequest', | ||
name='farms', | ||
), | ||
migrations.CreateModel( | ||
name='FarmGroupCropInsightField', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('field', models.CharField(max_length=256)), | ||
('column_number', models.PositiveSmallIntegerField(default=1, help_text='Column number on the csv. It is start from 1')), | ||
('label', models.CharField(blank=True, help_text='Change the field name to a other label. Keep it empty if does not want to override', max_length=256, null=True)), | ||
('active', models.BooleanField(default=True, help_text='Check if the field is active and included on the csv')), | ||
('farm_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gap.farmgroup')), | ||
], | ||
options={ | ||
'ordering': ['column_number'], | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name='cropinsightrequest', | ||
name='farm_group', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='gap.farmgroup'), | ||
), | ||
] |
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
Oops, something went wrong.