From 46da197507984d9836728692c8b979ecb48df4fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Sun, 6 Oct 2019 20:34:04 +0200 Subject: [PATCH 1/2] CI: track missing migrations --- .gitlab-ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8fcf9966..0f150d07 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,3 +59,21 @@ linters: key: linters paths: - vendor/ + +# Check whether there are some missing migrations. +migration_checks: + stage: test + before_script: + - mkdir -p vendor/{pip,apt} + - apt-get update -q && apt-get -o dir::cache::archives="vendor/apt" install -yqq postgresql-client + - cp cof/settings/secret_example.py cof/settings/secret.py + - pip install --upgrade -r requirements.txt + - python --version + script: python manage.py makemigrations --dry-run --check + services: + # this should not be necessary… + - postgres:9.6 + cache: + key: migration_checks + paths: + - vendor/ From 2964d3a4aae5c5fe316fe3007d820fd3c6099b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Sun, 6 Oct 2019 21:58:51 +0200 Subject: [PATCH 2/2] =?UTF-8?q?K-F=C3=AAT:=20new=20year=20=3D=20new=20prom?= =?UTF-8?q?o=20=3D=20new=20migration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kfet/migrations/0069_happy_new_year.py | 62 ++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 kfet/migrations/0069_happy_new_year.py diff --git a/kfet/migrations/0069_happy_new_year.py b/kfet/migrations/0069_happy_new_year.py new file mode 100644 index 00000000..bd380c47 --- /dev/null +++ b/kfet/migrations/0069_happy_new_year.py @@ -0,0 +1,62 @@ +# Generated by Django 2.2.6 on 2019-10-06 19:57 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [("kfet", "0068_on_delete_account")] + + operations = [ + migrations.AlterField( + model_name="account", + name="promo", + field=models.IntegerField( + blank=True, + choices=[ + (1980, 1980), + (1981, 1981), + (1982, 1982), + (1983, 1983), + (1984, 1984), + (1985, 1985), + (1986, 1986), + (1987, 1987), + (1988, 1988), + (1989, 1989), + (1990, 1990), + (1991, 1991), + (1992, 1992), + (1993, 1993), + (1994, 1994), + (1995, 1995), + (1996, 1996), + (1997, 1997), + (1998, 1998), + (1999, 1999), + (2000, 2000), + (2001, 2001), + (2002, 2002), + (2003, 2003), + (2004, 2004), + (2005, 2005), + (2006, 2006), + (2007, 2007), + (2008, 2008), + (2009, 2009), + (2010, 2010), + (2011, 2011), + (2012, 2012), + (2013, 2013), + (2014, 2014), + (2015, 2015), + (2016, 2016), + (2017, 2017), + (2018, 2018), + (2019, 2019), + ], + default=2019, + null=True, + ), + ) + ]