mirror of
https://github.com/evgen-app/chess_rpg_backend.git
synced 2024-11-22 01:27:00 +03:00
updated migrations
This commit is contained in:
parent
002f5a6783
commit
44841ac06e
|
@ -1,8 +1,6 @@
|
|||
# Generated by Django 4.0.5 on 2022-06-04 14:16
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import uuid
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -13,45 +11,4 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Hero',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
|
||||
('added', models.DateTimeField(auto_now_add=True)),
|
||||
('type', models.CharField(choices=[('WIZARD', 'wizard'), ('ARCHER', 'archer'), ('WARRIOR', 'warrior')], max_length=7)),
|
||||
('idle_img', models.ImageField(upload_to='uploads/idle')),
|
||||
('attack_img', models.ImageField(upload_to='uploads/attack')),
|
||||
('die_img', models.ImageField(upload_to='uploads/die')),
|
||||
('health', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(10)])),
|
||||
('speed', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(10)])),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'hero',
|
||||
'verbose_name_plural': 'heroes',
|
||||
'ordering': ['-added'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Player',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('ton_wallet', models.CharField(max_length=50, verbose_name='TON wallet')),
|
||||
('name', models.CharField(blank=True, max_length=100)),
|
||||
('added', models.DateTimeField(auto_now_add=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'player',
|
||||
'verbose_name_plural': 'players',
|
||||
'ordering': ['-added'],
|
||||
},
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='player',
|
||||
index=models.Index(fields=['ton_wallet'], name='game_player_ton_wal_47dd93_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='hero',
|
||||
index=models.Index(fields=['uuid'], name='game_hero_uuid_ada5d9_idx'),
|
||||
),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user