Gallery-Archivist/archivist/sites/furaffinity/migrations/0001_initial.py

132 lines
6.3 KiB
Python
Raw Normal View History

2023-10-21 18:52:42 +02:00
# Generated by Django 4.1.1 on 2023-10-21 16:51
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='FA_Gender',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('gender', models.CharField(max_length=30, unique=True)),
],
options={
'verbose_name': 'Gender',
'verbose_name_plural': 'Genders',
},
),
migrations.CreateModel(
name='FA_Mature',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('mature', models.CharField(max_length=30, unique=True)),
],
options={
'verbose_name': 'Mature Rating',
'verbose_name_plural': 'Mature Ratings',
},
),
migrations.CreateModel(
name='FA_Species',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('species', models.CharField(max_length=50, unique=True)),
],
options={
'verbose_name': 'Species',
'verbose_name_plural': 'Species',
},
),
migrations.CreateModel(
name='FA_Submission_File',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('file_hash', models.CharField(max_length=64, unique=True)),
('file_name', models.CharField(blank=True, max_length=150)),
('file', models.FileField(blank=True, upload_to='furaffinity/submissions/')),
('date_added', models.DateTimeField(auto_now_add=True)),
],
options={
'verbose_name': 'Submission File',
'verbose_name_plural': 'Submission Files',
},
),
migrations.CreateModel(
name='FA_Tags',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('tag', models.CharField(max_length=250, unique=True, verbose_name='Tag name')),
('tag_slug', models.SlugField(max_length=260, unique=True, verbose_name='Tag slug/url')),
],
options={
'verbose_name': 'Tag',
'verbose_name_plural': 'Tags',
},
),
migrations.CreateModel(
name='FA_UserIconFile',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('icon_file_hash', models.CharField(max_length=64, unique=True)),
('icon_file_name', models.CharField(blank=True, max_length=150)),
('icon_file', models.FileField(blank=True, upload_to='furaffinity/user_icon/')),
('date_added', models.DateTimeField(auto_now_add=True)),
],
options={
'verbose_name': 'User Icon File',
'verbose_name_plural': 'User Icon Files',
},
),
migrations.CreateModel(
name='FA_User',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('artist', models.CharField(max_length=35)),
('artist_url', models.SlugField(max_length=40, unique=True)),
('description', models.TextField(blank=True)),
('icon', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='furaffinity.fa_usericonfile')),
],
options={
'verbose_name': 'User',
'verbose_name_plural': 'Users',
},
),
migrations.CreateModel(
name='FA_Submission',
fields=[
('submission_id', models.PositiveBigIntegerField(default=1, primary_key=True, serialize=False, unique=True, verbose_name='ID')),
('media_url', models.URLField(blank=True)),
('title', models.CharField(default='', max_length=60)),
('description', models.TextField(blank=True, default='', null=True)),
('date', models.DateTimeField(null=True)),
('date_added', models.DateTimeField(auto_now_add=True)),
('number_of_comments', models.PositiveIntegerField(null=True)),
('views', models.PositiveIntegerField(null=True)),
('fa_theme', models.CharField(max_length=50, null=True, verbose_name='FA Theme')),
('fa_category', models.CharField(max_length=50, null=True, verbose_name='FA Category')),
('gallery_type', models.CharField(blank=True, max_length=20)),
('file_extension', models.CharField(blank=True, max_length=10)),
('image_height', models.PositiveIntegerField(blank=True, null=True)),
('image_width', models.PositiveIntegerField(blank=True, null=True)),
('artist', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='submissions', to='furaffinity.fa_user')),
('file', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='furaffinity.fa_submission_file')),
('gender', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='furaffinity.fa_gender')),
('mature_rating', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='furaffinity.fa_mature')),
('species', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='furaffinity.fa_species')),
('tags', models.ManyToManyField(to='furaffinity.fa_tags')),
],
options={
'verbose_name': 'Submission',
'verbose_name_plural': 'Submissions',
},
),
]