diff --git a/sapl/base/migrations/0050_metadata.py b/sapl/base/migrations/0050_metadata.py new file mode 100644 index 000000000..ec2f7435f --- /dev/null +++ b/sapl/base/migrations/0050_metadata.py @@ -0,0 +1,31 @@ +# Generated by Django 2.2.20 on 2022-07-29 01:02 + +import django.contrib.postgres.fields.jsonb +import django.core.serializers.json +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('contenttypes', '0002_remove_content_type_name'), + ('base', '0049_auto_20220728_2029'), + ] + + operations = [ + migrations.CreateModel( + name='Metadata', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('object_id', models.PositiveIntegerField(blank=True, default=None, null=True)), + ('metadata', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=None, encoder=django.core.serializers.json.DjangoJSONEncoder, null=True, verbose_name='Metadados')), + ('content_type', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.PROTECT, to='contenttypes.ContentType')), + ], + options={ + 'verbose_name': 'Metadado', + 'verbose_name_plural': 'Metadados', + 'unique_together': {('content_type', 'object_id')}, + }, + ), + ]