initial
This commit is contained in:
46
content/migrations/0001_initial.py
Normal file
46
content/migrations/0001_initial.py
Normal file
@@ -0,0 +1,46 @@
|
||||
# Generated by Django 4.2.13 on 2024-06-29 12:58
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Link',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('url', models.URLField(unique=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='MediaFile',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('file', models.FileField(upload_to='content/media')),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Question',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=500, unique=True)),
|
||||
('question', models.TextField()),
|
||||
('awnser', models.TextField()),
|
||||
('description', models.TextField(blank=True, null=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('links', models.ManyToManyField(to='content.link')),
|
||||
('medias', models.ManyToManyField(to='content.mediafile')),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,100 @@
|
||||
# Generated by Django 4.2.13 on 2024-06-30 07:20
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('content', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='mediafile',
|
||||
name='author',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='question',
|
||||
name='author',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='mediafile',
|
||||
name='file',
|
||||
field=models.FileField(upload_to='filestore/media'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='question',
|
||||
name='awnser',
|
||||
field=models.TextField(db_index=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='question',
|
||||
name='links',
|
||||
field=models.ManyToManyField(blank=True, to='content.link'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='question',
|
||||
name='medias',
|
||||
field=models.ManyToManyField(blank=True, to='content.mediafile'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='question',
|
||||
name='name',
|
||||
field=models.CharField(db_index=True, max_length=500, unique=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='question',
|
||||
name='question',
|
||||
field=models.TextField(db_index=True),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='QuestionVersion',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('data', models.JSONField()),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
|
||||
('question', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='content.question')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Level',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(db_index=True, max_length=25, unique=True)),
|
||||
('value', models.IntegerField(db_index=True, unique=True)),
|
||||
('description', models.TextField(blank=True, null=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Label',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(db_index=True, max_length=25, unique=True)),
|
||||
('description', models.TextField(blank=True, null=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='question',
|
||||
name='labels',
|
||||
field=models.ManyToManyField(blank=True, null=True, to='content.label'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='question',
|
||||
name='level',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='content.level'),
|
||||
),
|
||||
]
|
||||
18
content/migrations/0003_alter_question_labels.py
Normal file
18
content/migrations/0003_alter_question_labels.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.13 on 2024-06-30 07:20
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('content', '0002_mediafile_author_question_author_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='question',
|
||||
name='labels',
|
||||
field=models.ManyToManyField(blank=True, to='content.label'),
|
||||
),
|
||||
]
|
||||
19
content/migrations/0004_mediafile_name.py
Normal file
19
content/migrations/0004_mediafile_name.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 4.2.13 on 2024-06-30 17:14
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('content', '0003_alter_question_labels'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='mediafile',
|
||||
name='name',
|
||||
field=models.CharField(db_index=True, default='N.N.', max_length=25, unique=True),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
||||
18
content/migrations/0005_question_buzzword.py
Normal file
18
content/migrations/0005_question_buzzword.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.13 on 2024-07-01 08:27
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('content', '0004_mediafile_name'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='question',
|
||||
name='buzzword',
|
||||
field=models.CharField(blank=True, max_length=25, null=True),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,48 @@
|
||||
# Generated by Django 4.2.13 on 2024-07-02 06:53
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import filer.fields.file
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('filer', '0017_image__transparent'),
|
||||
('content', '0005_question_buzzword'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='link',
|
||||
name='author',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='link',
|
||||
name='description',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='link',
|
||||
name='name',
|
||||
field=models.CharField(blank=True, db_index=True, max_length=25, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='mediafile',
|
||||
name='description',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='link',
|
||||
name='url',
|
||||
field=models.URLField(db_index=True, unique=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='mediafile',
|
||||
name='file',
|
||||
field=filer.fields.file.FilerFileField(on_delete=django.db.models.deletion.RESTRICT, related_name='media_file', to='filer.file'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
# Generated by Django 4.2.13 on 2024-07-02 08:04
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import lib.middleware.current_user
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('content', '0006_link_author_link_description_link_name_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='label',
|
||||
name='author',
|
||||
field=models.ForeignKey(default=lib.middleware.current_user.get_current_user, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='level',
|
||||
name='author',
|
||||
field=models.ForeignKey(default=lib.middleware.current_user.get_current_user, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
# Generated by Django 4.2.13 on 2024-07-02 08:09
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import lib.middleware.current_user
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('content', '0007_alter_label_author_alter_level_author'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='link',
|
||||
name='author',
|
||||
field=models.ForeignKey(default=lib.middleware.current_user.get_current_user, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='mediafile',
|
||||
name='author',
|
||||
field=models.ForeignKey(default=lib.middleware.current_user.get_current_user, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
]
|
||||
19
content/migrations/0009_label_color.py
Normal file
19
content/migrations/0009_label_color.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 4.2.13 on 2024-07-02 12:27
|
||||
|
||||
import colorfield.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('content', '0008_alter_link_author_alter_mediafile_author'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='label',
|
||||
name='color',
|
||||
field=colorfield.fields.ColorField(default='#666666', image_field=None, max_length=25, samples=None),
|
||||
),
|
||||
]
|
||||
19
content/migrations/0010_level_color.py
Normal file
19
content/migrations/0010_level_color.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 4.2.13 on 2024-07-02 12:28
|
||||
|
||||
import colorfield.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('content', '0009_label_color'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='level',
|
||||
name='color',
|
||||
field=colorfield.fields.ColorField(default='#F90F90', image_field=None, max_length=25, samples=None),
|
||||
),
|
||||
]
|
||||
0
content/migrations/__init__.py
Normal file
0
content/migrations/__init__.py
Normal file
Reference in New Issue
Block a user