# Generated by Django 4.2.22 on 2025-07-02 12:01 from django.conf import settings import django.core.files.storage from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('book_name', models.CharField(max_length=500)), ('author_name', models.CharField(max_length=500)), ], ), migrations.CreateModel( name='BookCategory', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('category_name', models.CharField(max_length=500)), ], ), migrations.CreateModel( name='StateSave', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('save_id', models.UUIDField(default=uuid.uuid4)), ('name', models.CharField(default='Untitled', max_length=100)), ('description', models.CharField(max_length=400, null=True)), ('shared', models.BooleanField(default=False)), ('create_time', models.DateTimeField(auto_now_add=True)), ('save_time', models.DateTimeField(auto_now=True, db_index=True)), ('data_dump', models.TextField()), ('base64_image', models.ImageField(null=True, storage=django.core.files.storage.FileSystemStorage(base_url='/files', location='/home/sunil/git/xcosblocks/blocks/file_storage'), upload_to='simulation_images')), ('script_dump', models.TextField(null=True)), ('owner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Gallery', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('save_id', models.CharField(max_length=50, unique=True)), ('name', models.CharField(default='Untitled', max_length=100)), ('description', models.CharField(max_length=400, null=True)), ('save_time', models.DateTimeField(auto_now=True)), ('data_dump', models.TextField()), ('blocks', models.CharField(max_length=300, null=True)), ('media', models.CharField(max_length=100, null=True)), ('script_dump', models.TextField(null=True)), ('book', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='examples', to='saveAPI.book')), ], ), migrations.AddField( model_name='book', name='category', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='saveAPI.bookcategory'), ), ]