diff --git a/gcloud/contrib/template_market/migrations/0001_initial.py b/gcloud/contrib/template_market/migrations/0001_initial.py index 1a2ab4fc8..55f205cd3 100644 --- a/gcloud/contrib/template_market/migrations/0001_initial.py +++ b/gcloud/contrib/template_market/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-12-12 12:23 +# Generated by Django 3.2.15 on 2024-12-13 07:48 from django.db import migrations, models @@ -15,7 +15,7 @@ class Migration(migrations.Migration): fields=[ ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), ("project_id", models.IntegerField(default=-1, help_text="项目 ID", verbose_name="项目 ID")), - ("template_id", models.JSONField(db_index=True, help_text="模板 ID 列表", verbose_name="模板 ID 列表")), + ("template_id", models.IntegerField(db_index=True, help_text="模板 ID", verbose_name="模板 ID ")), ("creator", models.CharField(default="", max_length=32, verbose_name="创建者")), ("create_at", models.DateTimeField(auto_now_add=True, verbose_name="创建时间")), ("update_at", models.DateTimeField(auto_now=True, verbose_name="更新时间")), diff --git a/gcloud/contrib/template_market/models.py b/gcloud/contrib/template_market/models.py index 04d02eae0..1b761dbe7 100644 --- a/gcloud/contrib/template_market/models.py +++ b/gcloud/contrib/template_market/models.py @@ -65,7 +65,7 @@ def update_shared_record(self, new_template_ids, market_record_id, project_id, c class TemplateSharedRecord(models.Model): project_id = models.IntegerField(_("项目 ID"), default=-1, help_text="项目 ID") - template_id = models.JSONField(_("模板 ID 列表"), help_text="模板 ID 列表", db_index=True) + template_id = models.IntegerField(_("模板 ID"), help_text="模板 ID", db_index=True) creator = models.CharField(_("创建者"), max_length=32, default="") create_at = models.DateTimeField(_("创建时间"), auto_now_add=True) update_at = models.DateTimeField(verbose_name=_("更新时间"), auto_now=True)