Browse Source

fixture added to fix deployment problem with key constraints

master
Benni Baermann 2 years ago
parent
commit
1b045fb77d
10 changed files with 46 additions and 120 deletions
  1. +3
    -0
      TODO
  2. +1
    -0
      input/fixtures/accounts.json
  3. +0
    -25
      input/migrations/0062_auto_20210707_1314.py
  4. +41
    -0
      input/migrations/0062_auto_20211103_1155.py
  5. +0
    -23
      input/migrations/0063_auto_20210708_0553.py
  6. +0
    -18
      input/migrations/0064_alter_accounts_code.py
  7. +0
    -17
      input/migrations/0065_rename_accounts_account.py
  8. +0
    -18
      input/migrations/0066_project_finance_id.py
  9. +0
    -18
      input/migrations/0067_project_project_of_year.py
  10. +1
    -1
      input/models.py

+ 3
- 0
TODO View File

@ -1,5 +1,8 @@
known bugs:
- https://srcsrv.wikimedia.de/beba/foerderbarometer/issues/1
- helptext by /intern email: "Bitte gib deine E-Mail-Adresse ein, damit dich
Wikimedia Deutschland bei Rückfragen oder für
die Zusage kontaktieren kann." maybe this this misleading?

+ 1
- 0
input/fixtures/accounts.json View File

@ -0,0 +1 @@
[{"model": "input.account", "pk": "21111", "fields": {"description": "21111 Förderung (reaktiv)"}}, {"model": "input.account", "pk": "21112", "fields": {"description": "21112 WikiCon"}}, {"model": "input.account", "pk": "21115", "fields": {"description": "21115 Lokale Räume, Berlin"}}, {"model": "input.account", "pk": "21116", "fields": {"description": "21116 Lokale Räume, Hamburg"}}, {"model": "input.account", "pk": "21117", "fields": {"description": "Lokale Räume, Hannover"}}, {"model": "input.account", "pk": "21118", "fields": {"description": "21118 Lokale Räume, Köln"}}, {"model": "input.account", "pk": "21119", "fields": {"description": "21119 Lokale Räume, München"}}, {"model": "input.account", "pk": "21120", "fields": {"description": "21120 Lokale Räume, Fürth"}}, {"model": "input.account", "pk": "21125", "fields": {"description": "21125 Lokale Räume, allgemein"}}, {"model": "input.account", "pk": "21130", "fields": {"description": "21130 GLAM-Förderung"}}, {"model": "input.account", "pk": "21131", "fields": {"description": "21131 Initiative Förderung"}}, {"model": "input.account", "pk": "21140", "fields": {"description": "21140 Wikipedia-Kampagne"}}, {"model": "input.account", "pk": "21141", "fields": {"description": "21141 Wikipedia-Onboarding"}}, {"model": "input.account", "pk": "21150", "fields": {"description": "21150 Fürsorge und Online-Kommunikationskultur"}}]

+ 0
- 25
input/migrations/0062_auto_20210707_1314.py View File

@ -1,25 +0,0 @@
# Generated by Django 3.2.5 on 2021-07-07 13:14
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('input', '0061_concretevolunteer'),
]
operations = [
migrations.CreateModel(
name='Accounts',
fields=[
('acc', models.CharField(choices=[('DEF', 'DEFAULT VALUE, you hould not see this!'), ('21111', '21111 Förderung (reaktiv)'), ('21112', '21112 WikiCon'), ('21115', '21115 Lokale Räume, Berlin'), ('21116', '21116 Lokale Räume, Hamburg'), ('21117', '21117 Lokale Räume, Hannover'), ('21118', '21118 Lokale Räume, Köln'), ('21119', '21119 Lokale Räume, München'), ('21120', '21120 Lokale Räume, Fürth'), ('21125', '21125 Lokale Räume, allgemein'), ('21130', '21130 GLAM-Förderung'), ('21131', '21131 Initiative Förderung'), ('21140', '21140 Wikipedia-Kampagne'), ('21141', '21141 Wikipedia-Onboarding'), ('21150', '21150 Fürsorge und Online-Kommunikationskultur')], default='DEF', max_length=5, primary_key=True, serialize=False, verbose_name='Kostenstelle')),
],
),
migrations.AlterField(
model_name='project',
name='account',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='input.accounts'),
),
]

+ 41
- 0
input/migrations/0062_auto_20211103_1155.py View File

@ -0,0 +1,41 @@
# Generated by Django 3.2.5 on 2021-11-03 11:55
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('input', '0061_concretevolunteer'),
]
operations = [
migrations.CreateModel(
name='Account',
fields=[
('code', models.CharField(default='DEF', max_length=5, primary_key=True, serialize=False, verbose_name='Kostenstelle')),
('description', models.CharField(default='NO DESCRIPTION', max_length=60, verbose_name='Beschreibung')),
],
),
migrations.AddField(
model_name='project',
name='finance_id',
field=models.CharField(blank=True, max_length=15, null=True),
),
migrations.AddField(
model_name='project',
name='project_of_year',
field=models.IntegerField(default=0),
),
migrations.AlterField(
model_name='library',
name='type',
field=models.CharField(choices=[('BIB', '<a href="https://de.wikipedia.org/wiki/Wikipedia:Förderung/Zugang_zu_Fachliteratur#Bibliotheksstipendium">Bibliotheksstipendium</a>'), ('ELIT', '<a href="https://de.wikipedia.org/wiki/Wikipedia:Förderung/Zugang_zu_Fachliteratur#eLiteraturstipendium">eLiteraturstipendium</a>'), ('MAIL', '<a href="https://de.wikipedia.org/wiki/Wikipedia:Förderung/E-Mail-Adressen_und_Visitenkarten#E-Mail-Adressen">E-Mail-Adresse</a>'), ('IFG', '<a href="https://de.wikipedia.org/wiki/Wikipedia:Förderung/Gebührenerstattungen_für_Behördenanfragen">Kostenübernahme IFG-Anfrage</a>'), ('LIT', '<a href="https://de.wikipedia.org/wiki/Wikipedia:Förderung/Zugang_zu_Fachliteratur#Literaturstipendium">Literaturstipendium</a>'), ('LIST', '<a href="https://de.wikipedia.org/wiki/Wikipedia:Förderung/E-Mail-Adressen_und_Visitenkarten#Mailinglisten">Mailingliste</a>'), ('SOFT', '<a href="https://de.wikipedia.org/wiki/Wikipedia:Förderung/Software-Stipendien">Softwarestipendium</a>'), ('VIS', '<a href="https://de.wikipedia.org/wiki/Wikipedia:Förderung/E-Mail-Adressen_und_Visitenkarten#Visitenkarten">Visitenkarten</a>')], default='BIB', max_length=4),
),
migrations.AlterField(
model_name='project',
name='account',
field=models.ForeignKey(db_constraint=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='input.account'),
),
]

+ 0
- 23
input/migrations/0063_auto_20210708_0553.py View File

@ -1,23 +0,0 @@
# Generated by Django 3.2.5 on 2021-07-08 05:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0062_auto_20210707_1314'),
]
operations = [
migrations.RenameField(
model_name='accounts',
old_name='acc',
new_name='code',
),
migrations.AddField(
model_name='accounts',
name='description',
field=models.CharField(default='NO DESCRIPTION', max_length=30, verbose_name='Beschreibung'),
),
]

+ 0
- 18
input/migrations/0064_alter_accounts_code.py View File

@ -1,18 +0,0 @@
# Generated by Django 3.2.5 on 2021-07-08 05:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0063_auto_20210708_0553'),
]
operations = [
migrations.AlterField(
model_name='accounts',
name='code',
field=models.CharField(default='DEF', max_length=5, primary_key=True, serialize=False, verbose_name='Kostenstelle'),
),
]

+ 0
- 17
input/migrations/0065_rename_accounts_account.py View File

@ -1,17 +0,0 @@
# Generated by Django 3.2.5 on 2021-07-08 05:58
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('input', '0064_alter_accounts_code'),
]
operations = [
migrations.RenameModel(
old_name='Accounts',
new_name='Account',
),
]

+ 0
- 18
input/migrations/0066_project_finance_id.py View File

@ -1,18 +0,0 @@
# Generated by Django 3.2.5 on 2021-10-04 08:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0065_rename_accounts_account'),
]
operations = [
migrations.AddField(
model_name='project',
name='finance_id',
field=models.CharField(blank=True, max_length=15, null=True),
),
]

+ 0
- 18
input/migrations/0067_project_project_of_year.py View File

@ -1,18 +0,0 @@
# Generated by Django 3.2.5 on 2021-10-04 10:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0066_project_finance_id'),
]
operations = [
migrations.AddField(
model_name='project',
name='project_of_year',
field=models.CharField(blank=True, max_length=4, null=True),
),
]

+ 1
- 1
input/models.py View File

@ -54,7 +54,7 @@ class ConcreteExtern(Extern):
class Account(models.Model):
code = models.CharField('Kostenstelle', max_length=5, default="DEF",
null=False, primary_key = True)
description = models.CharField('Beschreibung', max_length=30, default='NO DESCRIPTION')
description = models.CharField('Beschreibung', max_length=60, default='NO DESCRIPTION')
def __str__(self):
return f"{self.code} {self.description}"

Loading…
Cancel
Save