mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 09:58:23 +02:00
Add __str__ to models, remove null=True in CharField and TextField
This commit is contained in:
17
apps/note/migrations/0003_replace_null_by_blank.py
Normal file
17
apps/note/migrations/0003_replace_null_by_blank.py
Normal file
@ -0,0 +1,17 @@
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('note', '0002_create_special_notes'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunSQL(
|
||||
"UPDATE note_note SET inactivity_reason = '' WHERE inactivity_reason IS NULL;"
|
||||
),
|
||||
migrations.RunSQL(
|
||||
"UPDATE note_transaction SET invalidity_reason = '' WHERE invalidity_reason IS NULL;"
|
||||
),
|
||||
]
|
23
apps/note/migrations/0004_remove_null_tag_on_charfields.py
Normal file
23
apps/note/migrations/0004_remove_null_tag_on_charfields.py
Normal file
@ -0,0 +1,23 @@
|
||||
# Generated by Django 2.2.16 on 2020-09-06 19:17
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('note', '0003_replace_null_by_blank'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='note',
|
||||
name='inactivity_reason',
|
||||
field=models.CharField(blank=True, choices=[('manual', 'The user blocked his/her note manually, eg. when he/she left the school for holidays. It can be reactivated at any time.'), ('forced', "The note is blocked by the the BDE and can't be manually reactivated.")], default='', max_length=255),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='transaction',
|
||||
name='invalidity_reason',
|
||||
field=models.CharField(blank=True, default='', max_length=255, verbose_name='invalidity reason'),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user