mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-27 23:22:25 +00:00
fix: Update deposits initial migration
This commit is contained in:
parent
69128becc7
commit
8ea161291e
2 changed files with 6 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Generated by Django 2.2.18 on 2021-08-06 13:10
|
# Generated by Django 2.2.18 on 2021-08-06 13:54
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
@ -25,6 +25,7 @@ class Migration(migrations.Migration):
|
||||||
options={
|
options={
|
||||||
'verbose_name': 'deposit item',
|
'verbose_name': 'deposit item',
|
||||||
'verbose_name_plural': 'deposit items',
|
'verbose_name_plural': 'deposit items',
|
||||||
|
'abstract': False,
|
||||||
},
|
},
|
||||||
bases=(re2o.mixins.RevMixin, re2o.mixins.AclMixin, models.Model),
|
bases=(re2o.mixins.RevMixin, re2o.mixins.AclMixin, models.Model),
|
||||||
),
|
),
|
||||||
|
@ -34,6 +35,7 @@ class Migration(migrations.Migration):
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('date', models.DateTimeField(auto_now_add=True, verbose_name='date')),
|
('date', models.DateTimeField(auto_now_add=True, verbose_name='date')),
|
||||||
('returned', models.BooleanField(default=False, verbose_name='returned')),
|
('returned', models.BooleanField(default=False, verbose_name='returned')),
|
||||||
|
('deposit_amount', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='deposit amount')),
|
||||||
('item', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='deposits.DepositItem')),
|
('item', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='deposits.DepositItem')),
|
||||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
|
||||||
],
|
],
|
||||||
|
|
|
@ -50,7 +50,9 @@ class Deposit(RevMixin, AclMixin, models.Model):
|
||||||
item = models.ForeignKey("DepositItem", on_delete=models.PROTECT)
|
item = models.ForeignKey("DepositItem", on_delete=models.PROTECT)
|
||||||
date = models.DateTimeField(auto_now_add=True, verbose_name=_("date"))
|
date = models.DateTimeField(auto_now_add=True, verbose_name=_("date"))
|
||||||
returned = models.BooleanField(default=False, verbose_name=_("returned"))
|
returned = models.BooleanField(default=False, verbose_name=_("returned"))
|
||||||
deposit_amount = models.DecimalField(verbose_name=_("deposit amount"))
|
deposit_amount = models.DecimalField(
|
||||||
|
max_digits=5, decimal_places=2, verbose_name=_("deposit amount")
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
abstract = False
|
abstract = False
|
||||||
|
|
Loading…
Reference in a new issue