30 lines
1.0 KiB
Python
30 lines
1.0 KiB
Python
# Generated by Django 4.2.10 on 2024-03-03 17:48
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import uuid
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('users', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Post',
|
|
fields=[
|
|
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
|
('content', models.TextField(max_length=1000)),
|
|
('tags', models.JSONField()),
|
|
('createdAt', models.DateTimeField(auto_now_add=True)),
|
|
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posts', to='users.profile')),
|
|
('dislikes', models.ManyToManyField(blank=True, related_name='disliked_posts', to='users.profile')),
|
|
('likes', models.ManyToManyField(blank=True, related_name='liked_posts', to='users.profile')),
|
|
],
|
|
),
|
|
]
|