fixed
This commit is contained in:
@@ -5,6 +5,7 @@ from django import forms
|
||||
from django.contrib import admin, messages
|
||||
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
|
||||
from unfold.admin import ModelAdmin, TabularInline
|
||||
from unfold.contrib.filters.admin import ChoicesDropdownFilter, RelatedDropdownFilter
|
||||
from simple_history.admin import SimpleHistoryAdmin
|
||||
from igny8_core.admin.base import AccountAdminMixin, Igny8ModelAdmin
|
||||
from .models import User, Account, Plan, Subscription, Site, Sector, SiteUserAccess, Industry, IndustrySector, SeedKeyword, PasswordResetToken
|
||||
|
||||
@@ -10,42 +10,34 @@ class Migration(migrations.Migration):
|
||||
]
|
||||
|
||||
operations = [
|
||||
# Declare the fields in Django schema so migrations can use them
|
||||
# These fields already exist in DB, so state_operations syncs Django's understanding
|
||||
migrations.SeparateDatabaseAndState(
|
||||
state_operations=[
|
||||
migrations.AddField(
|
||||
model_name='aimodelconfig',
|
||||
name='landscape_size',
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
help_text="Landscape image size for this model (e.g., '1792x1024', '1280x768')",
|
||||
max_length=20,
|
||||
null=True,
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='aimodelconfig',
|
||||
name='square_size',
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
default='1024x1024',
|
||||
help_text="Square image size for this model (e.g., '1024x1024')",
|
||||
max_length=20,
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='aimodelconfig',
|
||||
name='valid_sizes',
|
||||
field=models.JSONField(
|
||||
blank=True,
|
||||
default=list,
|
||||
help_text="List of valid sizes for this model (e.g., ['1024x1024', '1792x1024'])",
|
||||
),
|
||||
),
|
||||
],
|
||||
database_operations=[
|
||||
# No DB operations - fields already exist via direct SQL
|
||||
],
|
||||
# Add the fields to the database
|
||||
migrations.AddField(
|
||||
model_name='aimodelconfig',
|
||||
name='landscape_size',
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
help_text="Landscape image size for this model (e.g., '1792x1024', '1280x768')",
|
||||
max_length=20,
|
||||
null=True,
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='aimodelconfig',
|
||||
name='square_size',
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
default='1024x1024',
|
||||
help_text="Square image size for this model (e.g., '1024x1024')",
|
||||
max_length=20,
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='aimodelconfig',
|
||||
name='valid_sizes',
|
||||
field=models.JSONField(
|
||||
blank=True,
|
||||
default=list,
|
||||
help_text="List of valid sizes for this model (e.g., ['1024x1024', '1792x1024'])",
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user