Skip to content

Commit

Permalink
fix: 修复 ApplicationDeploymentModuleOrder 表 migration 问题 (#1763)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiayuan929 authored Nov 28, 2024
1 parent 4838347 commit efba444
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.16 on 2024-11-21 09:59
# Generated by Django 4.2.16 on 2024-11-28 08:22

from django.db import migrations, models
import django.db.models.deletion
Expand All @@ -7,20 +7,36 @@
class Migration(migrations.Migration):

dependencies = [
('modules', '0016_auto_20240904_1439'),
('applications', '0012_application_is_ai_agent_app'),
("modules", "0016_auto_20240904_1439"),
("applications", "0012_application_is_ai_agent_app"),
]

operations = [
migrations.CreateModel(
name='ApplicationDeploymentModuleOrder',
name="ApplicationDeploymentModuleOrder",
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('order', models.IntegerField(verbose_name='顺序')),
('module', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='modules.module', unique=True, verbose_name='模块')),
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("order", models.IntegerField(verbose_name="顺序")),
(
"module",
models.OneToOneField(
db_constraint=False,
on_delete=django.db.models.deletion.CASCADE,
to="modules.module",
verbose_name="模块",
),
),
],
options={
'verbose_name': '模块顺序',
"verbose_name": "模块顺序",
},
),
]
2 changes: 1 addition & 1 deletion apiserver/paasng/paasng/platform/applications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ def code(self):


class ApplicationDeploymentModuleOrder(models.Model):
module = models.ForeignKey(Module, on_delete=models.CASCADE, verbose_name="模块", unique=True)
module = models.OneToOneField(Module, on_delete=models.CASCADE, verbose_name="模块", db_constraint=False)
order = models.IntegerField(verbose_name="顺序")

class Meta:
Expand Down

0 comments on commit efba444

Please sign in to comment.