Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #226 from open-contracting/missing-migrations
Browse files Browse the repository at this point in the history
ci: Check for missing migrations
  • Loading branch information
jpmckinney committed Mar 31, 2021
2 parents 7fe5222 + 99ac8bd commit 3a4df48
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
- run: pip install -r requirements_dev.txt
- run: |
./manage.py migrate
./manage.py makemigrations --check --dry-run
./manage.py loaddata country redflag equitycategory equitykeywords
coverage run --source content,country,covidadmin,vizualization,country/management/commands manage.py test
env:
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
exclude: /migrations/

repos:
- repo: https://github.com/psf/black
rev: 20.8b1
Expand Down
48 changes: 48 additions & 0 deletions content/migrations/0045_auto_20210331_1526.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Generated by Django 3.1.7 on 2021-03-31 15:26

import content.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('content', '0044_auto_20210316_1049'),
]

operations = [
migrations.AlterModelOptions(
name='countrypartner',
options={'verbose_name': 'Country Partner', 'verbose_name_plural': 'Country Partners'},
),
migrations.AlterModelOptions(
name='dataimport',
options={'verbose_name': 'Data Import', 'verbose_name_plural': 'Data Imports'},
),
migrations.AlterModelOptions(
name='eventspage',
options={'verbose_name': 'Event', 'verbose_name_plural': 'Events'},
),
migrations.AlterModelOptions(
name='insightspage',
options={'verbose_name': 'News & Blog', 'verbose_name_plural': 'News & Blogs'},
),
migrations.AlterModelOptions(
name='resourcespage',
options={'verbose_name': 'Resource', 'verbose_name_plural': 'Resources'},
),
migrations.AlterModelOptions(
name='staticpage',
options={'verbose_name': 'Static Page', 'verbose_name_plural': 'Static Pages'},
),
migrations.AddField(
model_name='dataimport',
name='validated',
field=models.BooleanField(blank=True, default=False),
),
migrations.AlterField(
model_name='dataimport',
name='import_file',
field=models.FileField(null=True, upload_to='documents', validators=[content.validators.validate_file_extension]),
),
]
33 changes: 33 additions & 0 deletions country/migrations/0030_auto_20210331_1526.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.1.7 on 2021-03-31 15:26

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('country', '0029_auto_20210325_1106'),
]

operations = [
migrations.AlterField(
model_name='redflag',
name='description',
field=models.CharField(blank=True, db_index=True, help_text='Not used.', max_length=300, null=True, verbose_name='Description'),
),
migrations.AlterField(
model_name='redflag',
name='function_name',
field=models.CharField(blank=True, db_index=True, help_text='This corresponds to a function in the code. Do not edit it unless you are a developer.', max_length=300, null=True, verbose_name='Function'),
),
migrations.AlterField(
model_name='redflag',
name='implemented',
field=models.BooleanField(blank=True, default=False, help_text='Display the red flag. Do not enable unless you know the red flag is implemented.', null=True),
),
migrations.AlterField(
model_name='redflag',
name='title',
field=models.CharField(blank=True, db_index=True, help_text='A short description of the red flag, as shown in the frontend.', max_length=250, null=True, verbose_name='Title'),
),
]
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[tool.black]
line-length = 119
exclude = 'migrations'
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# From https://black.readthedocs.io/en/stable/compatible_configs.html

[flake8]
exclude = content/migrations
exclude = migrations
max-line-length = 119
extend-ignore = E203, W503, E722

[isort]
skip = content/migrations, country/migrations
skip = migrations
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
Expand Down

0 comments on commit 3a4df48

Please sign in to comment.