Skip to content

Commit

Permalink
Include migration
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaSat committed Oct 3, 2023
1 parent 9e53f41 commit 718a228
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Generated by Django 4.2.5 on 2023-10-03 20:12

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


class Migration(migrations.Migration):
dependencies = [
("api", "0042_alter_order_logs_alter_robot_avatar"),
]

operations = [
migrations.AddField(
model_name="order",
name="latitude",
field=models.DecimalField(
decimal_places=6,
max_digits=8,
null=True,
validators=[
django.core.validators.MinValueValidator(-90),
django.core.validators.MaxValueValidator(90),
],
),
),
migrations.AddField(
model_name="order",
name="longitude",
field=models.DecimalField(
decimal_places=6,
max_digits=9,
null=True,
validators=[
django.core.validators.MinValueValidator(-180),
django.core.validators.MaxValueValidator(180),
],
),
),
migrations.AlterField(
model_name="order",
name="bond_size",
field=models.DecimalField(
decimal_places=2,
default=3.0,
max_digits=4,
validators=[
django.core.validators.MinValueValidator(1.0),
django.core.validators.MaxValueValidator(15.0),
],
),
),
]
8 changes: 4 additions & 4 deletions api/models/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ class ExpiryReasons(models.IntegerChoices):
decimal_places=6,
null=True,
validators=[
MinValueValidator(config(-90, cast=float)),
MaxValueValidator(config(90, cast=float)),
MinValueValidator(-90),
MaxValueValidator(90),
],
blank=False,
)
Expand All @@ -144,8 +144,8 @@ class ExpiryReasons(models.IntegerChoices):
decimal_places=6,
null=True,
validators=[
MinValueValidator(config(-180, cast=float)),
MaxValueValidator(config(180, cast=float)),
MinValueValidator(-180),
MaxValueValidator(180),
],
blank=False,
)
Expand Down
11 changes: 5 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ services:

backend:
build: .
image: backend
container_name: django-dev
restart: always
depends_on:
Expand Down Expand Up @@ -61,7 +60,7 @@ services:
- ./frontend/static:/usr/src/robosats/static

clean-orders:
image: backend
build: .
restart: always
container_name: clord-dev
environment:
Expand All @@ -74,7 +73,7 @@ services:
network_mode: service:tor

follow-invoices:
image: backend
build: .
container_name: invo-dev
restart: always
depends_on:
Expand All @@ -90,7 +89,7 @@ services:
network_mode: service:tor

telegram-watcher:
image: backend
build: .
container_name: tg-dev
restart: always
environment:
Expand All @@ -103,7 +102,7 @@ services:
network_mode: service:tor

celery-worker:
image: backend
build: .
container_name: cele-worker-dev
restart: always
environment:
Expand All @@ -119,7 +118,7 @@ services:
network_mode: service:tor

celery-beat:
image: backend
build: .
container_name: cele-beat-dev
restart: always
environment:
Expand Down

0 comments on commit 718a228

Please sign in to comment.