kopia lustrzana https://gitlab.com/marnanel/chapeau
add reblog field to Status
rodzic
b6a59cdc61
commit
0b99864320
|
@ -0,0 +1,24 @@
|
|||
# Generated by Django 3.0.4 on 2020-04-15 15:06
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('trilby_api', '0003_auto_20200414_1634'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='status',
|
||||
name='reblog_of',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='reblogs', to='trilby_api.Status'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='status',
|
||||
name='in_reply_to',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='replies', to='trilby_api.Status'),
|
||||
),
|
||||
]
|
|
@ -33,6 +33,7 @@ class Status(models.Model):
|
|||
|
||||
in_reply_to = models.ForeignKey(
|
||||
'self',
|
||||
related_name = 'replies',
|
||||
on_delete = models.DO_NOTHING,
|
||||
null = True,
|
||||
blank = True,
|
||||
|
@ -92,6 +93,14 @@ class Status(models.Model):
|
|||
default = settings.KEPI['LANGUAGES'][0],
|
||||
)
|
||||
|
||||
reblog_of = models.ForeignKey(
|
||||
'self',
|
||||
related_name = 'reblogs',
|
||||
on_delete = models.CASCADE,
|
||||
null = True,
|
||||
blank = True,
|
||||
)
|
||||
|
||||
idempotency_key = models.CharField(
|
||||
max_length = 255,
|
||||
null = True,
|
||||
|
|
Ładowanie…
Reference in New Issue