Fix command makemigrations

This commit is contained in:
2024-12-26 14:48:33 -08:00
parent 9c74006148
commit 83768e0cf0
25 changed files with 189 additions and 2 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,186 @@
# Generated by Django 5.1.4 on 2024-12-26 21:07
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0005_securitytoken'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='ChangeFactionPrice',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('price', models.DecimalField(decimal_places=2, default=10.0, max_digits=6)),
],
),
migrations.CreateModel(
name='ChangeRacePrice',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('price', models.DecimalField(decimal_places=2, max_digits=5)),
],
),
migrations.CreateModel(
name='CustomizePrice',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('price', models.DecimalField(decimal_places=2, default=1.0, max_digits=5)),
],
),
migrations.CreateModel(
name='GoldPrice',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('gold_amount', models.IntegerField()),
('price', models.DecimalField(decimal_places=2, max_digits=10)),
],
),
migrations.CreateModel(
name='GuildRenameSettings',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('cost', models.IntegerField(default=1000, help_text='Costo en Donation Points (DP) para renombrar una hermandad.')),
],
options={
'verbose_name': 'Configuración de Renombrar Hermandad',
'verbose_name_plural': 'Configuraciones de Renombrar Hermandad',
},
),
migrations.CreateModel(
name='HomeApiPoints',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('accountID', models.IntegerField(unique=True)),
('vp', models.IntegerField(default=0)),
('dp', models.IntegerField(default=0)),
],
options={
'db_table': 'home_api_points',
},
),
migrations.CreateModel(
name='LevelUpPrice',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('price', models.DecimalField(decimal_places=2, default=10.0, max_digits=10)),
],
),
migrations.CreateModel(
name='RenamePrice',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('price', models.DecimalField(decimal_places=2, default=2.0, max_digits=5)),
],
),
migrations.CreateModel(
name='ReviveHistory',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('character_name', models.CharField(max_length=50)),
('used_at', models.DateTimeField()),
],
),
migrations.CreateModel(
name='TransferPrice',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('price', models.DecimalField(decimal_places=2, max_digits=5)),
],
),
migrations.CreateModel(
name='UnstuckHistory',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('character_name', models.CharField(max_length=50)),
('used_at', models.DateTimeField()),
],
),
migrations.CreateModel(
name='VoteSite',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100, unique=True)),
('url', models.URLField(help_text='URL del sitio de votación')),
('image_url', models.URLField(help_text='URL completa de la imagen', max_length=300)),
('points', models.IntegerField(default=1, help_text='Puntos otorgados por votar')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
],
),
migrations.RemoveField(
model_name='securitytoken',
name='user_id',
),
migrations.AddField(
model_name='accountactivation',
name='is_new_email_used',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='accountactivation',
name='is_used',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='accountactivation',
name='old_email',
field=models.EmailField(blank=True, max_length=254, null=True),
),
migrations.AddField(
model_name='accountactivation',
name='old_email_hash',
field=models.CharField(blank=True, max_length=32, null=True),
),
migrations.AddField(
model_name='securitytoken',
name='user',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
migrations.CreateModel(
name='StoreCategory',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('parent_category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='home.storecategory')),
],
),
migrations.CreateModel(
name='StoreItem',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('item_id', models.IntegerField()),
('image_url', models.URLField()),
('price', models.DecimalField(decimal_places=2, max_digits=6)),
('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='home.storecategory')),
],
),
migrations.CreateModel(
name='Cart',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('username', models.CharField(max_length=150)),
('added_at', models.DateTimeField(auto_now_add=True)),
('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='home.storeitem')),
],
),
migrations.CreateModel(
name='VoteLog',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('account_id', models.IntegerField()),
('created_at', models.DateTimeField(auto_now_add=True)),
('last_vote_time', models.DateTimeField(blank=True, null=True)),
('processed', models.BooleanField(default=False)),
('processed_at', models.DateTimeField(blank=True, null=True)),
('vote_site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='home.votesite')),
],
),
]
Binary file not shown.
+3 -2
View File
@@ -219,14 +219,15 @@ class AccountActivation(models.Model):
class SecurityToken(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True)
token = models.CharField(max_length=6)
created_at = models.DateTimeField(auto_now_add=True)
expires_at = models.DateTimeField()
ip_address = models.GenericIPAddressField()
def __str__(self):
return f"Token for {self.user.username}"
return f"Token for {self.user.username if self.user else 'Desconocido'}"
class GuildRenameSettings(models.Model):
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.